Challenge #5: Use a photocell to change an LED
In this challenge, we first learned about how a photocell is a resistor that takes in the amount of light in its surroundings and changes the amount of resistance depending on how much light is sensed. Using the line Serial.print() we were able to translate the number the photocell took in to a description of how bright it was. We then used the photocell to turn on and off an LED. We made it so that when the photocell thought it was "dim" (200 < value < 400) the LED would turn on and if the light value was not within that range, the LED would stay off.
Challenge #6 Use a button
In this challenge we learned how to use a button to turn on and off an LED. The LED only turns on when the button is pressed because when the button is pressed the circuit is closed and electrons are able to flow through it but when the button is not pressed, the circuit is not complete and so the LED does not turn on.
Challenge # 7 Use a Servo motor
Sweep:
The disk on the Servo continuously moves back and forth between a specified angle range. We put it to 90 degrees to 90 degrees.
The disk rotates between 60 and 120 degrees when the potentiometer is turned from one side to the other.
Reflection:
The most difficult and frustrating challenge was fixing the pattern with no delay code. It took us a really long time to understand exactly what was going on but it was very satisfying when we were finally able to fix it. The most enjoyable part of the last challenges was controlling the LED using the photocell and button.
Amazing visuals and videos complement it perfectly!
ReplyDelete