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

Activity 5: Centering the Servos

In this activity, you will run a sketch that sends the “stay-still” signal to the servos.    You will then use a screwdriver to adjust the servos so that they actually stay still. This is called centering the servos. After the adjustment, you will run test sketches that will  turn the servos clockwise and counterclockwise at various speeds.

Tool Required

You’ll need a Phillips #1 point screwdriver with a 1/8″ (3.18 mm) or smaller shaft.

Sending the Center Signals

If a servo has not yet been centered, it may turn, vibrate, or make a humming noise when it receives the “stay-still” signal.  

  • Reconnect your programming cable, and re-run LeftServoStayStill.
  • Set the BOE Shield’s Power switch to 2, to provide power to the servos.

  • Use a screwdriver to gently adjust the potentiometer in the servo as shown in Figure 2‑26.  Don’t push too hard!  Adjust the potentiometer slightly until you find the setting that makes the servo stop turning, humming or vibrating.

  • Verify that the pin 13 LED signal monitor circuit is showing activity.  It should glow like it did when you ran LeftServoStayStill the first time.

What’s a Potentiometer?
A potentiometer is kind of like an adjustable resistor with a moving part, such as a knob or a sliding bar, for setting the resistance. The Parallax continuous rotation servo’s potentiometer is a recessed knob that can be adjusted with a small Phillips screwdriver tip.  Learn more about potentiometers in What’s a Microcontroller? and Basic Analog and Digital at www.parallax.com. 

Your Turn – Center the Servo Connected to Pin 12

  • Repeat the process for the pin 12 servo using the sketch RightServoStayStill.
/*
 Robotics with the BOE Shield – RightServoStayStill
 Transmit the center or stay still signal on pin 12 for center adjustment.
 */

#include <Servo.h>                           // Include servo library
 
Servo servoRight;                            // Declare right servo

void setup()                                 // Built-in initialization block
{
  servoRight.attach(12);                     // Attach right signal to pin 12
  servoRight.writeMicroseconds(1500);        // 1.5 ms stay still signal
}  
 
void loop()                                  // Main loop auto-repeats
{                                            // Empty, nothing needs repeating
}

Printer-friendly version
4-cell Pack + Boe-Boost Setup
Prev
Activity 6: Testing the Servos
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress