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
Make a robot friend with Adafruit’s CRICKIT – A Creative Robotics & Interactive Construction Kit. It’s an add-on to our popular Circuit Playground Express, FEATHER and other platforms to make and program robots with CircuitPython, MakeCode, and Arduino. Start controlling motors, servos, solenoids. You also get signal pins, capacitive touch sensors, a NeoPixel driver and amplified speaker output. It complements & extends your boards so you can still use all the goodies on the microcontroller, now you have a robotics playground as well.