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

How It Works

Did You Know

About Motion Control

The motion.maneuver(left_speed, right_speed, duration) command runs both wheel servos simultaneously for a specific time. Negative speeds reverse direction, allowing curved or in-place turns.

About HUSKYLENS Models

The HUSKYLENS can store up to six models on its microSD card. Each model can contain multiple learned faces, colors, or tags that can be recalled in later programs.

How It Works

This activity combines two modules—HUSKYLENS vision and cyber:bot navigation—to create an interactive behavior loop. Most setup and I2C initialization steps were introduced in earlier activities. Here, the focus is on loading and acting upon stored training data.

The switch_algorithm(“face”) command places the HUSKYLENS in face-recognition mode, and manage_model(“load”, 1) recalls the previously saved face model from the SD card. This allows the camera to recognize faces learned in an earlier session.

switch_algorithm("face")
manage_model("load", 1)

The code below checks for button presses so you can cycle through trained face IDs. This part adds flexibility, letting you test recognition of multiple people.

if button_a.is_pressed():
current_id += 1
if current_id > 5: current_id = 1

The most important new logic appears in the request_data() loop. This section fetches visual results from the HUSKYLENS, checks whether a specific ID is visible, and triggers movement accordingly. When a match is found, the cyber:bot displays a check mark, performs a left-then-right turning sequence, and restores the displayed ID. If no faces are detected, it stops and shows an idle icon.

if is_visible(current_id, "block"):
display.show(Image.YES)
motion.maneuver(-75, -25, 2000)
sleep(6000)
motion.maneuver(75, 25, 2000)

Printer-friendly version

DISCUSSION FORUMS | PARALLAX INC. STORE

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

© 2025 Parallax Learn • Built with GeneratePress