Petoi Doc Center
🇺🇸English
Search…
⌃K

Gesture Sensor

Function introduction

The sensor features advanced gesture detection, proximity detection and digital ambient light sensing. Gesture detection can accurately sense "up, down, left and right" and more complex movements.

Hardware setup

Connecting to the NyBoard with wire as shown in the following picture:
For specific use, the end connected to the sensor can be fixed on the robot's head (included in Bittle's mouth or attached to the top of Nybble's head), of course, you can also use your creativity according to actual needs.

Software setup

  1. 1.
    Install the latest version of the Arduino_APDS9960 library using the Arduino IDE
2. Upload the Demo sketch (gesture.ino)
Of course, you can also compile and upload your own sketch for the gesture sensor.
This demo sketch (gesture.ino) implements real-time printing of various directional gestures (up, down, left, and right) made by the user in front of the gesture sensor in the serial monitor.

The demo code

gesture.zip
21KB
Binary