Step 7Integrating the Light Sensors
1. Again, disconnect the power from the servo motors before doing this step
2. The setup for the light sensors will be done twice. It is almost the exact same setup as the momentary switch. Actually, it is the same setup, but this time you will use the light sensor (photo-resistor) instead of a momentary switch.
3. Because this robot will use the two light sensors to pick a direction to drive it is recommended that you set up each light sensor on opposite sides of the solderless breadboard or as far apart as possible.
4. Connect one end of a light sensor to the (+5V) power line and the other end into a small strip in the center of the board.
5. Connect a 10k ohm resistor to that same strip and the other end to ground
6. Now connect a jumper wire from the small strip (where the photo resistor and regular resistor are connected) and plug the other end into an analog input.
7. Connect the left sensor to analog input 0 on the Arduino and the right sensor to analog input 1.
8. You should now be able to use the light sensors to move the servos.
| « Previous Step | Download PDFView All Steps | Next Step » |
1
comment
|
Add Comment
|
![]() |
Add Comment
|




















































