👋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.

BiBoard

Hardware setup

BiBoard V1 for Bittle X V2 / Bittle X+Arm / Nybble Q

BiBoard V0 for Bittle X

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.

Software setup

Petoi Desktop App

  • You can use the Firmware Uploaderarrow-up-right within the Petoi Desktop App. Please select the correct Product type, Borard version, and Serial port. The mode should be Standard, so press the Upgrade the Firmware button. for example, Bittle, BiBoard_V0_2, COM5 as follows:

    After uploading, open the serial monitorarrow-up-right and use the serial command "XG" to switch to using the gesture sensor mode.

Arduino IDE

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/testGesturearrow-up-right) using the Arduino IDE.

circle-info

Note:

Before uploading the demo sketch, you must first set up the development environmentarrow-up-right.

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.

NyBoard for Bittle / Nybble

Hardware setup

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

Software setup

Petoi Desktop App

Arduino IDE

The code using this sensor has been integrated into the OpenCatarrow-up-right 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

Last updated