Back to Parent

Process

  • To make this alarm, there were two processes I needed to make work. First, the switch needed to turn on/off the alarm system (photoreceptor + LED), not the LED. Second, the alarm system threshold so that the LED would turn on only when the light sensor was > 3000. 
  • I struggled to figure out where how to adjust the void loop to make this work. If I separated each process one after the other in the loop, then when the switch was off, the light sensor would turn it back on as the loop repeated. So, I nested the photocell threshold instructions within the if/else switch statement. This created the desired effect. 


Content Rating

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

0