Gesture Detection - Ezblock

Completed the gesture calibration, we can start using Pan-Tilt HAT to detect our gestures. Now, what can be detected by our Pan-Tilt HAT includes rock, scissor, paper.

../_images/sp21hannn.jpg

TIPS

You may want to simplify your program with Variable. For example, when you need to use the values of the type of gesture repeatedly, just assign them to variables for repeated use instead of reading repeatedly.

../_images/sp211111_162950.png

Click the Create variable button on the Variables category to create a new variable.

../_images/sp211111_162846.png

This block is used to do conditional judgement. Judging conditions can be “=”, “>”, “<”, “≥”, “≤”, “≠”.

../_images/sp211111_165042.png

This block is used to do “logical judgment” and judging conditions can be “and”, “or” etc.

../_images/sp211111_165029.png

You need to turn on gesture detection.

../_images/sp211111_164954.png

You can read the results of the detected gesture through this block. In the drop-down menu, choose to read the coordinates, size, type or accuracy of the detected gesture.

../_images/sp211111_165136.png

EXAMPLE

../_images/sp211111_163648.png