Datasheet

Light-Sensitive Navigation with Phototransistors • Chapter 6
Robotics with the BOE Shield-Bot 181
Reconnect programming cable and battery pack power to your board.
Put the BOE Shield’s power switch in position 1.
Create and save the PhototransistorVoltage sketch, and run it on your Arduino.
Slowly move the flashlight or lamp over the phototransistor, and watch the value
of A3 in the Serial Monitor. Brighter light should cause larger voltage values and
dimmer light should cause smaller voltages.
If the ambient light is brighter than just fluorescent lights, and you have a bright
flashlight, you may need to replace the 2 kΩ resistor with a smaller value. Try 1
kΩ, 470 Ω, or even 220 Ω for really bright lights.
If the ambient light is low, and you are using a fluorescent desk lamp bulb or an
LED flashlight for your bright light, you may need to change the 2 kΩ resistor to
4.7 kΩ, or even 10 kΩ.
Record values for ambient light (your normal room light levels), and then bright
light, like when you shine a flashlight right on the phototransistor. Make a note of
themyou’ll need them for the sketch after this one.
/*
* Robotics with the BOE Shield - PhototransistorVoltage
* Display voltage of phototransistor circuit output connected to A3 in
* the serial monitor.
*/
Light getting brighter
Back to low light
Bright light
Low light