This chapter introduces different programming strategies to make the BOE Shield-Bot move. Once we understand how basic navigation works, we’ll make functions for each maneuver. In later chapters, we’ll write sketches that call these functions in response to sensor input, which will allow the BOE Shield-Bot to navigate on its own.
The first step is to get oriented! The picture below shows forward, backward, left turn, and right turn from the point of view of the BOE Shield-Bot.
Here are the goals of this chapter’s activities:
- Perform basic maneuvers: forward, backward, rotate left, rotate right, pivoting turns to the left and right, and stop.
- Tune the maneuvers from Activity #1 so that they are more precise.
- Use math to calculate servo run times to make the BOE Shield-Bot travel a predetermined distance.
- Write sketches that make the BOE Shield-Bot gradually accelerate into and decelerate out of maneuvers.
- Write functions to perform the basic maneuvers, and incorporate function calls into the sketches wherever they’re needed.
- Design a function for quickly defining custom maneuvers
- Store complex maneuvers in arrays and write sketches that play back these maneuvers
- Download Chapter 4 Arduino Code
- Follow the links below to get started!