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
  • SumoBot WX Movement Basics

SumoBot WX Movement Basics

How the Wheel Test Works

The Propeller FLiP executes blocks starting at the top and works its way downward.  So, the first block it executes is CR servo PIN 27 speed 50, which makes the servo turn at about half speed counterclockwise. 

The pause (ms) 3000 makes the Propeller FLiP do nothing for 3 seconds.  During that time, the wheel continues to turn. 

Next, CR servo PIN 27 speed -50 makes the servo turn at half speed clockwise, and the pause (ms) 3000 block below it allows it to continue turning for another 3 seconds. 

Last but not least, CR servo PIN 27 speed 0 makes the servo turn at 0 speed, and since there’s nothing after it, it continues to hold that (zero) speed indefinitely.  

When the Propeller executes code from a CR servo PIN….speed… block, another one of the Propeller microcontroller’s 8 cores steps in and starts sending repeated signals to make a continuous rotation servo turn at a certain speed.  It will keep sending those signals and the servo will keep turning until another CR servo PIN…speed… block asks for a different speed.  At that point, the Propeller core that is sending the servo control signals updates them for the new behavior.

This “set it and forget it” response to CR servo PIN…speed… blocks is very useful. Your program can do other things while the servos are turning, like check sensors, calculate, decide, and more.  Instead of doing that here, the program uses pause (ms) 3000 blocks to just do nothing for 3 seconds.  Those pause (ms) blocks allow you to see the servos turn one direction, and then the other before stopping.  Without the pause (ms) blocks, all you’d see would be a twitch, and the program would be over in the blink of an eye.

 


Printer-friendly version
Speed & Direction Program
Prev
Try This: RPM
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2026 Parallax Learn • Built with GeneratePress