Friday, March 4, 2016

Arduino Practice Day 2

Challenge: Use the photocell to change something about the LED behavior based on room brightness.

Our Program

(I'm sorry, but I can't get these photos to line up properly.)

Our Hardware


Our Results



Challenge: Use the tiny tactile switch to turn the LED on and off.

Our Program

Our Hardware


Our Results



Challenge: Use Knob to control your servo.

Our Program



Our Hardware




Our Results



Challenge: Use Sweep to control your servo

Our Program

This program allows the servo to rotate independently from 0 to 180 degrees.


Our Hardware

See picture for Knob hardware

Our Results



Challenge: Change Knob so the servo only rotates between 60 and 120 degrees.

Our Program

Our Hardware

See picture for Knob Hardware

Our Results



Reflection:

My favorite challenge was the photo cell. First, we established values for different brightness levels by changing the environment of the photocell. For example,  we went in the bathroom and turned the light off to determine a value for dark of less than 100. For very bright, Amy shined her flashlight on the photocell in order to obtain a value of greater than 800. After deciding on all of our values, we programmed the code so that different LEDs would light up depending on the brightness level. I thought that was very neat. 

One frustrating aspect arose when I was trying to run Button in order to take a video. I couldn't get it to work, and I thought that I had put some of the wires in the wrong places. I kept taking the circuit apart and putting it back together, to no avail, I finally realized that the reason it wasn't working was that I was running the Button program from the examples, rather than the code from the handout. 

While I didn't think Servo and Knob were as remarkable as the photocell challenge, I can see how they would be very useful. I was also surprised at how hard it was to stall the servo motor -- neither of us could do it! It must be a very high torque motor. 

3 comments:

  1. It's interesting that your partner and you tried to stall the servo motor by yourselves!

    ReplyDelete
  2. It's really cool that you and your partner went in the bathroom and shined a flashlight on the photocell to determine values for really dark and very bright!

    ReplyDelete
  3. Thessaly,
    Your post is really easy to follow and understand. You guys were really adventurous, with the bathroom trip and stalling the servo. Also, interesting observations.

    ReplyDelete