Back to Parent

Check Reaction

Particle IDE

The first bus stop determines if there's a reaction by checking the value of the "motion" variable which is updated in the loop. The motion variable is updated based on the PIR's value and sending the next decision to the second bus stop. While this is happening the bus stop will pulse once. 

Particle Cloud

If the value of the PIR is HIGH there is motion if it is LOW there is no motion. If there is motion the first bus stop will publish an event "Reaction" to evoke a new action at the next bus stop. The data argument is published as the event data and based on the event's data the second bus stop will act cycling through similar flag colors. 


Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!

0