Jump to navigation
Chapter 7 Challenges
Questions
- 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?
- What has to happen after the tone command to find out if the IR receiver detects reflected infrared?
- What does it mean if the IR detector sends a low signal? What does it mean when the detector sends a high signal?
- 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
- Modify a line of code in IrInterferenceSniffer so that it only monitors one of the IR detectors.
- 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.
Projects
- Design a BOE Shield-Bot application that sits still until you wave your hand in front of it, then it starts roaming.
- Design a BOE Shield-Bot application that slowly rotates in place until it detects an object. As soon as it detects an object, it locks onto and chases the object. This is a classic ‘SumoBot’ behavior.
- Design a BOE Shield-Bot application that roams, but if it detects infrared interference, it sounds the alarm briefly, and then continues roaming. This alarm should be different from the low battery alarm.