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
  • Upgrade Your cyber:bot with Feedback 360° Servos

Upgrade Your cyber:bot with Feedback 360° Servos

Maneuvers with Distance Control

Distance in Ticks

The cyber:bot board’s Feedback 360° servo driver measures distance in 64ths of a turn.  That’s equivalent to half way between two of the smallest spokes in the cyber:bot wheel.  For simplicity, we’ll call 1/64th of a rotation a ’tick’.  Since the diameter of the cyber:bot wheel is 66.2 mm, we can use Ω x diameter to calculate that the circumference is 208 mm.  Then, 1/64th of that is 3.25 mm, the distance the wheel travels when it rotates one tick.

The feedback360 module has a method named drive.goto(), which you supply with two distances in ticks, one for each wheel.  In this example, drive.goto(64, 64) results in both wheels turning forward 64 ticks x 3.25 mm/tick = 208 mm, the circumference of the wheel.  Converting to inches, that would be 208 mm x 1 in/ 25.4 mm ≈ 8.2 in.  Using 32 ticks would get the cyber:bot about half that far, about 4.1 in.     

In this activity, you will use drive.goto to make the cyber:bot travel certain distances, and incorporate calculations into your script to make the cyber:bot travel a specified distance in inches.  You will use distance values that will make the cyber:bot turn in place, pivot, and arc.

Distance Maneuver Script

This script will perform the forward, left, right, left, backward pattern, and the cyber:bot should return much closer to its starting point.  In fact, with drive.goto, you can mark the spoke on each wheel that’s pointing straight up when the script starts, and it should be pointing up again when the script completes.

  • Make sure there are five AA batteries to your cyber:bot robot’s battery pack and that it’s plugged into your cyber:bot board.
  • Connect the micro:bit in the cyber:bot to your computer with a USB cable.
  • Set the PWR switch to 0.
  • Right-click the distances_forward_left_right_left_backward.hex link below, and select Save link as…

distances_forward_left_right_left_backward.hex

  • Open distances_forward_left_right_left_backward.hex it with the micro:bit Python Editor editor.
  • Click Send to micro:bit.

Distance Maneuver Tests

  • Disconnect the USB cable from the cyber:bot robot’s micro:bit module.
  • Set it on the floor
  • Set the PWR switch to 2.
  • Verify that the cyber:bot
    • Rolls forward for 3 wheel turns
    • Rotates left for by about 90°
    • Rotates right by about 180°
    • Rotates left by about 90°
    • Rolls backward for 3 wheel turns

 


Printer-friendly version
More Turning Maneuvers
Prev
How the Distance Maneuver Tests Work
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress