Another great chapter from the Parallax documentation for the Board of Education shield bot kit for Arduino! Chapter 4:
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.
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