TensorFlow Lite - Magic Wand


• AmebaD [ AMB23 / AMB21 / AMB22 / BW16 / AW-CU488 Thing Plus / AMB25 ] x 1
• Adafruit LSM9DS1 accelerometer
• LED x 2



AMB21 / AMB22 wiring diagram:

Connect the Accelerometer and LEDs to the board shown in the following diagram.

AMB23 wiring diagram:

For AMB23, we will use the onboard LEDs on the board itself.

BW16 wiring diagram:

For BW16, we will use the onboard LED on the board itself.

BW16 type C wiring diagram:

AW-CU488 Thing Plus wiring diagram:

AMB25 wiring diagram:

Download the Ameba customized version of TensorFlow Lite for Microcontrollers library at https://github.com/ambiot/ambd_arduino/tree/master/Arduino_zip_libraries.
Follow the instructions at https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries to install it.
Ensure that the patch files found at https://github.com/ambiot/ambd_arduino/tree/master/Ameba_misc/ are also installed.
Open the example, “Files” -> “Examples” -> “TensorFlowLite_Ameba” -> “magic_wand”.

Upload the code and press the reset button on Ameba board once the upload has completed.
Holding the Accelerometer steady, with the positive x-axis pointing to the right and the positive z-axis pointing upwards, move it following the shapes as shown, moving it in a smooth motion over 1 to 2 seconds, avoiding any sharp movements.

If the movement is recognised by the Tensorflow Lite model, you should see the same shape output to the Arduino serial monitor. Different LEDs will light up corresponding to different recognized gestures.
Note that the wing shape is easy to achieve, while the slope and ring shapes tend to be harder to get right.

Code Reference

More information on TensorFlow Lite for Microcontrollers can be found at: https://www.tensorflow.org/lite/microcontrollers

Please confirm that QQ communication software is installed