Wednesday, May 27, 2009

[Assignment] Analog and Photocell

The 1st part of the lab assignment is to read analog input and to control the brightness of the LED light. Everything works fine, but the Serial.println doesn't print on the council!!! I didn't get this part in my coding. The photo is a demo of how the potentiometer controls the LED brightness.


The 2nd part of the lab: I used the photocell in the kit to control the LED. It is like a very very early prototype for my dream machine from the other day. So luckily, I got the photocell and LED work! The LED goes dimer when the surrounding light is darker. The following pic is that I put the breadboard and Led behind a plastic box to seem like a nicer looking prototye. 
However, it is hard to capture the LED changing when I took picture. So, I took this photo when the room is bright. I guarantee when I turned off the light and made my laptop in sleep mode, the LED doesn't turn on due to the total darkness. (Besides, I have trouble to print the analog Serial to the arduino...)

No comments:

Post a Comment