cosparks / trypdeck

0 stars 0 forks source link

Build out LEADER behavior in main application loop #22

Closed cosparks closed 2 years ago

cosparks commented 2 years ago

**Do this after finalizing the serial communication protocol and building out the follower side of the application.

The leader will respond to gpio inputs (the chain pull, etc.). It needs to: • manage application state and notify followers of a change in application state • handle the decoding of video files for the LED matrix • play videos on its own screen • (low priority) update files on followers via UART serial when its own media folders have been changed (related issue)

cosparks commented 2 years ago

Startup • leader waits X amount of time to sync up with followers • when each individual screen is synced, leader sends out message for that screen to play a video • when X amount of time has passed and leader has synced with X other pis on network, update all and enter wait phase Wait • leader sends out notification to both followers to play video/led X (all videos should be synced up) Pulled • leader sends out notification to both followers to play video/led X (all videos should be synced up) Reveal • leader sends out notification to both followers to play random video and specific LED • reveal lasts X amount of time (all card videos should be the same length) • after X amount of time, return to Wait