Datasheet
Chapter 7 • Navigating with Infrared Headlights
244 • Robotics with the BOE Shield-Bot
Programming
• How to use the familiar Arduino tone function for a new purpose: to modulate an
infrared light signal, instead of control the pitch of a sound
• How to repurpose an existing sketch from one sensor system for use with a
different sensor system, so long as both sensors have a similar output signal
• How to repurpose an existing sketch designed for a specific behavior (avoiding
obstacles) to a new behavior (detecting a drop-off)
Robotics Skills
• Using a pair of infrared emitters and receivers to detect objects for non-contact
autonomous sensor navigation
Engineering Skills
• Using human-visible indicators (red LEDs) to broadcast the state of sensors
detecting human-invisible conditions (reflected modulated infrared light)
• More practice with subsystem testing and troubleshooting
Chapter 7 Challenges
Questions
1. What is the frequency of the signal sent by tone(9, 38000, 8)? How long does
this call send the signal for? What I/O pin does the IR LED circuit have to be
connected to in order to broadcast this signal?
2. What has to happen after the tone command to find out if the IR receiver detects
reflected infrared?
3. What does it mean if the IR detector sends a low signal? What does it mean when
the detector sends a high signal?
4. What happens if you change the value of a resistor in series with a red LED?
What happens if you change the value of a resistor in series with an infrared
LED??
Exercises
1. Modify a line of code in IrInterferenceSniffer so that it only monitors one of the IR
detectors.
2. Modify AvoidTableEdge so that when it makes the BOE Shield-Bot back up, it also
turns a little so that it doesn’t get stuck going straight back at the same drop-off.