Questions, Exercises, & Projects: Gatekeeper (MakeCode)
Questions
-
What does switch_algorithm(“face”) do?
-
Why does the script load model 1 before starting detection?
-
What happens when you press button A or B during operation?
Exercises
-
Add code so the cyber#bot flashes the LED display rapidly when a face is detected.
-
Modify the code so the robot performs only one turning cycle before stopping until a button is pressed again.
Projects
-
Create a “Greet the Recognized Face” project. When the HUSKYLENS detects a known face, the cyber:bot should move forward, stop, display a heart, and play a tone. When the face disappears, it should show an X and back up slightly.
-
Design a “Face Patrol” project where the robot scans for known faces and performs a short spin when none are detected.