Skip to content

🐂 Bull Fighting Program (Blockly Demo)

This Blockly program is designed to instruct a drone to perform the following actions:

  • Face Detection: The drone continuously checks its camera feed to detect whether a human face is present.
  • Detection Countdown: Once a face is detected, the drone counts 30 camera frames so it can make sure that a face is actually presented, which is approximately 1 second.
  • Forward Movement: After the countdown is completed, the drone flies forward for a distance of 250 cm (centimeters).
  • 180° Turn: After moving forward, the drone performs a 180-degree yaw turn to face the opposite direction.

WARNING

⚠️ Use this program with caution. The drone may move toward you at high speed.

Blocks used in this program

The drone continuously checks its camera feed to detect whether a human face is present.

Detect Face Block

Detect faces from image

If Conditions

ifdo

Flight

80⇈ Flight to (cm)⇊ Land

Move forward

50↑ Forward for(cm)

Set Yaw CW

45↻ Set Yaw Clockwise todeg

Program Code


Program Summary

ParameterValue/ActionFunction
Initial Altitude150 cmAchieve operating height.
Detection MethodFace DetectionDetect whether a human face is present in the camera frame.
Attack Delay30 frames (~1 second)Wait for approximately 1 second after detecting a face.
Forward Movement250 cmFly forward for a distance of 250 cm.
Final Movement180° YawRotate 180 degrees to face the opposite direction.