How to trigger video based on time

Hi all,

So I've been using Processing for the last couple of weeks, and have been trying to incorporate it in to my final project for University. I've so far created a working clock based on the designs of the old BBC clocks that used to play when the channels shut down for the night, and what I'm looking to do is essentially trigger a video to play at a certain time of the day (on the hour is ideal), play through, finish, return to the clock, and repeat. Now, I have a rough idea of how I could do it, but I want to see if there are any easier ways to go about this than what I was thinking.

Thanks!

Answers

  • any easier ways to go about this than what I was thinking.

    What were you thinking?

    You can use if(millis()>nextTime){} as a timer to trigger the event, then set nextTime = nextTime + 10006060.

    Or you could if(hour()>lastHour){} as a timer and update lastHour = (lastHour+1)%24 each time it goes off.

    Or you could use one of the times even libraries on the Processing Libraries page. Lots of options!

Sign In or Register to comment.