Challenges
The following challenges will let you build a better robot and learn more from the techniques in this chapter:
- Try using the distance sensor to drive your robot. Can you tell where a wall is and navigate parts of your space using the sensor data only?
- We’ve added minimal style to the pages. Could you do better? The start/stop links are small and hard to read and the graph isn’t centered.
- Consider cable management for the sensor cable. Adhesive clips aligning the cable along the top right of the chassis will work well here.
- Remembering to stop the sensor ranging when walking away is easy to forget. Could you add a behavior that would stop ranging on a 10-minute timer? Perhaps with “I’m still here” messages to prevent that?
- Another idea is to use the “Last will” system in MQTT.js so that if the phone disconnects, the broker will tell the behavior to stop.
- We’ve taken steps in this chapter to reduce repeating code. What...