Tests: Gatekeeper (MakeCode)
✓ Flash the script to the cyber:bot.
✓ Point the HUSKYLENS toward a face that was previously trained and stored in model slot 1.
✓ When the trained face is detected, the robot should:
• Display a check mark (Image.YES).
• Perform a turning maneuver.
• Return to its starting direction.
✓ If the face disappears, the robot stops and shows an X.
✓ If no faces are visible, the robot shows the sleeping face icon.
Note: The script loads model 1 from the HUSKYLENS SD card. Make sure a trained face model is stored before running the program.
Try This
In this activity extension, you’ll experiment with different algorithms and movement patterns to see how changing visual detection or motor control affects performance. You’re working toward understanding how to use the same motion logic across different HUSKYLENS modes. Expect to see changes in responsiveness or accuracy depending on which algorithm you select.
✓ Change switch_algorithm(“face”) to “color” or “tag” and observe how detection and motion change.
✓ Modify the speeds in motion.maneuver(-75, -25, 2000) to widen or tighten the robot’s turns.
✓ Add sound feedback with music.play(music.BA_DING) when a face is detected.