Did You Know?
You can use your own WAV files for this project. Give your ActivityBot a vocabulary all its own, add different music tracks, or even sound effects. Our Sound Library features easy how-to’s for using the free Audacity software:
Try This – Driving Test!
Gather some friends, and see who is the best ActivityBot driver!
- Increase the length of the last pause function call to 2500.
- Set up a maze of boxes with walls about 30 cm apart, with several turns of different angles.
- Use a stopwatch and take turns driving through the box maze to see who can drive through it fastest. But be careful – hitting a wall causes a 3-second penalty!
Try a Different Sensor
Remember this little piece of code, the inner while(... loop? ?
while((input(7) + input(8)) == 2) // Inner loop while whiskers not pressed
If you want to use a different sensor for object detection, this is the line to change. For example, instead of whiskers, let's say you have a PING))) Ultrasonic Distance Sensor connected to P8. Provided you add #include "ping.h" to the top of your code, just replace that line with the following:
while(ping_cm(8) > 10) // Inner loop while no object within 10 cm
This will keep the inner loop looping as long as the measured distance returned by the PING))) sensor is greater than 10 cm.
Here are some helpful hints for using this activity in a classroom:
- Overhead fluorescent light fixtures can emit infrared light and interfere with IR signals. It might be wise to have your students try the Your Turn section of the IR Receiver and Remote Tutorial and then scope out the classroom lighting for sources of infrared interference.
- If several students are trying this project in the same room, be aware that every remote can control every robot. Have students move to different corners of the room, or take turns.
- Or, take advantage of the single-controller, many-robot feature. It can be fun to have the robots line up or face each other in a square and have one remote controller make them speak and dance in unison!
- If you have several robots in the same place, try modifying the program for each one separately to respond to only a few of the number buttons. That way you can give each robot a smaller but unique set of audio responses from the same remote.