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
  • Tilt-Controlled Gripper with the cyber:bot Robot

Tilt-Controlled Gripper with the cyber:bot Robot

Test the Tilt-Controlled Gripper

Tests

Follow these step-by-step instructions to test the tilt-drive and button Gripper control functions.

  • Hold the micro:bit tilt controller level with the LED matrix facing the ceiling and the edge connector pointing away from you.
  • Disconnect the cyber:bot robot with Gripper from the USB.  
  • Set the cyber:bot robot with Gripper on the floor and set its PWR switch to 2.
  • Tilt the micro:bit away from you and the cyber:bot should roll forward.
  • Also try tilting the micro:bit toward you to make the cyber:bot roll backward.
  • While rolling either forward or backward, you can also tilt the micro:bit left/right to add turning.
  • Hold the micro:bit level again to make the cyber:bot stop.
  • Press/release the B button.  Verify that the Gripper paddles close and lift.
  • Press/release the A button and verify that the Gripper paddles lower and open.

How the Project Scripts Work

The scripts in this project are just slightly expanded versions of the ones from the Cybersecurity: Radio Tilt Control tutorial’s Radio Tilt Controlled cyber:bot activity.  

To add button control to the Radio Tilt Controller Code, the routine below was added to the transmitter app.  It expands the dictionary to contain data indicating which of the micro:bit module’s buttons were pressed.  Before this, it just contained x, y, and needle key value pairs.

    if button_b.was_pressed():          # add
        dictionary['button'] = 'B'      # add
    elif button_a.was_pressed():        # add
        dictionary['button'] = 'A'      # add
    else:
        dictionary['button'] = 'None'   # add

 

This line was added to the Radio Controlled cyber:bot Code.  

            button = dictionary['button']  # added

 

These lines were added to respond to the button values by lowering/opening or closing/lifting the Gripper paddles.

            if button == 'B':               # added
                bot(16).servo_angle(30)     # added Gripper close & lift
            elif button == 'A':             # added
                bot(16).servo_angle(150)    # added Gripper lower & open

 


Printer-friendly version
Script for Tilt & Grip Controller
Prev
Tune and Organize the Project Code
Next

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress