Arduino Intro (Part II)

Use the photocell to change something with LED behavior:

The first way we tried to do this was extremely inefficient (it took two screenshots to capture the whole code!)

Then, we found a much easier way to vary its behavior, by setting delay() to equal the value of the photocell.

Use the tactile switch to turn the LED on and off through the Arduino

On the one hand, this seemed kind of pointless, because a switch placed directly in series with the LED would do the same thing, however it was still good to learn how to remotely trigger something. I have a feeling that there will be a time when this is useful!

 

Sweep and Knob to control the Servo motor

Print Friendly, PDF & Email
One Comment
  1. The way you used your photocell is really interesting, how you had the blinking rate slow down when you covered it. We did the opposite and its really interesting to see that reflected in your code!

Leave a Reply