I’m working on a project for work where there are two boxes, each with a button and a ring of LEDs controlled by a photon. One of the buttons is pushed to make an order and the other button is pushed to acknowledge the order. Whenever a button is pressed, the LEDs turn on or off (eventually there will be other states/animations to signify said states) and my goal is to have both rings of LEDs are in the same state.
I have a working prototype using .publish but my fear is that there is no guarantee that both LEDs are doing the same animation. Any idea how to go about this? My idea is as such:
Button press -> local LED lights up and .publish to say “order request” -> remote photon subscribes to events and sees request -> remote LED lights up and .publish to say “order receive” -> local photon subscribes to events and sees order is received.
Essentially there’s two publish events every time a button is pressed. Is that overkill?