Calibrate the Photo sensor input from Arduino and Trigger a video playback

kmkonline's icon

Dear All,

I am a new user of Max. I would like to create a video trigger by photo sensor.

I would like to playback a video once the program start at full screen. ( Still haven't figure out how to control an ext. display).

Then when the first photo sensor is being triggered. I would fade out the 1st video and then start the 2nd video for several seconds. When the photo sensor is continuously being trigger.. the video will playback until its end then go back to the 1st video.

Alternatively, if there is no trigger when playing 2nd video. It will go back to the first video.

Please advise if there is any place I can find relevant informations.

Thank you very much.

Mui_Max_Patch_V.1.3.maxpat
Max Patch
kmkonline's icon

I can successfully trigger the fading and do the sensing part.

But I wanna do a fall back of video from 2 to 1 and 3 to 2 if possible after a pro longed period which the photo sensor is not triggered.

Mui_Max_Patch_V.2.2.maxpat
Max Patch