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.

NyBoard
Software setup
There are two methods to upload the gesture mode firmware :
Using the Petoi Desktop App
Using the Arduino IDE
Petoi Desktop App
You can use the Firmware Uploader within the Petoi Desktop App. Please select the correct Product type, Board version, and Serial port according to your actual use. The mode should be Gesture, so press the Upgrade the Firmware button. For example, Nybble, NyBoard_V1_2, COM5 as follows:
Arduino IDE
You can use Arduino IDE to upload and modify the source code.
The code using this sensor has been integrated into the OpenCat project. Uncomment the line #define GESTURE
in the OpenCat.ino, as shown in the figure below, and then use the Arduino IDE to upload the sketch to the robot main board, which can reproduce the example function of integrating the robot action.
Prepare the Arduino UNO development environment
With NyBoard V1_*, you can choose Arduino Uno.

Modify the code in the OpenCat.ino

Hardware setup
After uploading the sketch, connect to the NyBoard with wire, as shown in the following picture:

BiBoard
Software setup
There are two methods to upload the firmware :
Using the Petoi Desktop App
Using the Arduino IDE
Petoi Desktop App
You can use the Firmware Uploader within the Petoi Desktop App. Please select the correct Product type, Board version, and Serial port according to your actual use. The mode should be Standard, so press the Upgrade the Firmware button. For example, Bittle, BiBoard_V0_2, COM5 as follows:
Arduino IDE
You can use Arduino IDE to upload the sketch(OpenCatEsp32.ino). Use the latest OpenCatESP32 code to finish the setup. For example, to modify the code for Bittle as shown below:
After uploading, there are two methods to activate/deactivate the gesture mode:
Serial Monitor
Open the serial monitor and use the serial command "XG" to activate the gesture mode.
Open the serial monitor and use the serial command "Xg" to deactivate the gesture mode.
Mobile App
Create a mobile app command called "Activate gesture" and use the code:
X71
Create a mobile app command called "Deactivate gesture" and use the code:
X103
Hardware setup
BiBoard V0

BiBoard V1

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 your needs.
Testing code
If you want to test a gesture sensor's function alone or learn more about its principles. You can upload the demo sketch(ModuleTests/testGesture) using the Arduino IDE.
This testing sketch 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.

Last updated
Was this helpful?