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. 

Projects

  1. Design a BOE Shield-Bot application that sits still until you wave your hand in front of it, then it starts roaming.
  2. 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.
  3. 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.