Skip to content
Parallax Learn

Parallax Learn

  • Welcome
  • Tutorials
        • Tutorial Series head tag

          Tutorial Series
        • Tutorial Series

          The special, classroom-ready series pages are organized collections of tutorials for our most popular hardware and/or languages. The tutorials for each topic are conveniently accessible from a single page, shown in the order it is recommended that they be completed.
        • Robotics Series Head tag

          Robotics Series
        • Robotics Series

          • Artificial Intelligence
          • Cybersecurity: Radio Data tutorialCybersecurity
          • cyber:bot + Python
          • cyber:bot + MakeCode
          • Boe-Bot Tutorial SeriesBoe-Bot
          • Arduino Shield-Bot
          • ActivityBot with C TutorialsActivityBot + C
          • ActivityBot with BlocklyProp Tutorial SeriesActivityBot + BlocklyProp
          • Scribbler 3 Tutorial SeriesScribbler 3
        • Electronics & Programming Series Head tag

          Electronics & Programming Series
          • BS2 Board of Education Tutorial SeriesBS2 Board of Education
          • Propeller C-Language BasicsPropeller C Basics
          • FLiP Try-It Kit C Tutorial SeriesFLiP Try-It Kit + C
          • FLiP Try-It Kit BlocklyProp TutorialsFLiP Try-It Kit + BlocklyProp
          • Badge WX Tutorial SeriesBadge WX
          • Propeller BlocklyProp Basics and ProjectsPropeller BlocklyProp Basics
          • View All Tutorial Series »
        • Browse Tutorials
        • Browse Tutorials

          Individual tutorials sorted by robot or kit, and language.
        • By Robot or Kit
          • ActivityBot
          • SumoBot WX
          • Boe-Bot
          • Shield-Bot
          • cyber:bot
          • Badge WX
          • ELEV-8
          • ARLO
        • By Language
        • By Language

          • Propeller C
          • Arduino
          • BlocklyProp
          • PBASIC
          • Python
          • MakeCode
          • View All Tutorials »
  • Educators
  • Reference
  • Downloads
  • Home
  • All Courses
  • Robotics with the Board of Education Shield for Arduino

Robotics with the Board of Education Shield for Arduino

Tuning the Turns

The amount of time the BOE Shield-Bot spends rotating in place determines how far it turns.  So, to tune a turn, all you need to do is adjust the delay function’s ms parameter to make it turn for a different amount of time.

Let’s say that the BOE Shield-Bot turns just a bit more than 90° (1/4 of a full circle).  Try delay(580), or maybe even delay(560).  If it doesn’t turn far enough, make it run longer by increasing the delay function’s ms parameter 20 ms at a time.

The smallest change that actually makes a difference is 20. 
Servo control pulses are sent every 20 ms, so adjust your delay function call’s ms parameter in multiples of 20.

If you find yourself with one value slightly overshooting 90° and the other slightly undershooting, choose the value that makes it turn a little too far, then slow down the servos slightly.  In the case of rotating left, both writeMicroseconds us parameters should be changed from 1300 to something closer to 1500.  Start with 1400 and then gradually increase the values to slow both servos.  For rotating right, start by changing the us parameters from 1700 to 1600, and then experiment with reducing in increments of 10 from there.

Your Turn – 90° RotatingTurns and Sketch Updates

  • Modify ForwardLeftRightBackward so that it makes precise 90° rotating turns.
  • Update the label on each servo with a notation about the appropriate delay function ms parameter for a 90° turn.
  • Update the delay function ms parameters in ForwardLeftRightBackward with the values that you determined for straight forward and backward travel.

Carpeting can cause navigation errors.
If you are running your BOE Shield-Bot on carpeting, don’t expect perfect results!  The way the carpet pile is laying can affect the way your BOE Shield-Bot travels, especially over long distances.  For more precise maneuvers, use a smooth surface.


Printer-friendly version
Activity 2: Tuning the Basic Maneuvers
Prev
Activity 3: Calculating Distances
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

About | Terms of Use | Feedback: learn@parallax.com | Copyright©Parallax Inc. 2024

© 2025 Parallax Learn • Built with GeneratePress