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
  • Cybersecurity: Radio Tilt Control

Cybersecurity: Radio Tilt Control

Receiver Full Tilt Control & Stop Range

In addition to displaying the diamond when the y-axis tilt is close to level, the radio_tilt_bot_fb_with_stop_range project also makes the cyber:bot stay still.

Example project: radio_tilt_bot_fb_with_stop_range

  • If you are in a classroom, adjust the radio set group in the project to your assigned channel.
  • Make sure the PWR switch is set to 1 first.
  • Enter and flash radio_tilt_bot_fb_with_stop_range into the micro:bit that’s in the receiver cyber:bot. 

  • Tilt the micro:bit transmitter and verify that the receiver cyber:bot displays a copy of the needle.
  • Hold the micro:bit tilt transmitter level, with the LEDs upward and the USB connector pointing toward you.
  • Verify that both the transmitter and receiver micro:bits display a diamond.
  • Set the cyber:bot board PWR switch to 2.

While still holding the transmitter micro:bit level, does the cyber:bot stay still?

As you tilt the tilt transmitter away from and then toward you, does it make the cyber:bot roll forward and backward?

  • Set the PWR switch back to 1.

How It Works

Here is the portion of radio_tilt_bot_fb_with_stop_range that’s different from the previous radio_tilt_bot_fb_only that it’s based on. 

Keep in mind that fb is y / 8, so instead of looking for y being outside the +/- 80 range, this program checks if fb is outside the +/- 8 range. When the absolute value of fb is greater than 8, the project displays the tilt needle and sets the vL and vR variables just like it did in the previous radio_tilt_bot_fb_only project. But when fb falls inside the -8 to 8 range, it displays the diamond and sets vL and vR to 0. Whenever the else block sets vL and vR to zero, it makes the servos stop spinning.


Printer-friendly version
Transmitter Displays Stop Range
Prev
Add Left/Right Tilt Control
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress