TensorFlow Lite - Magic Wand

材料准备

• AmebaD [ AMB23 / AMB21 / AMB22 / BW16 / AW-CU488 Thing Plus / AMB25 ] x 1

• Adafruit LSM9DS1 加速感测器
• LED x 2

范例

流程

AMB21 / AMB22 接线图:

如下图,将加速感测器和LED连接到开发板上。

AMB23 接线图:

直接使用 AMB23 板上的LED

BW16 接线图:

直接使用 BW16 板上的LED

BW16 type C 接线图:

AW-CU488 Thing Plus 接线图:

AMB25 接线图:

从以下网址下载TensorFlow Lite for Microcontrollers的Ameba版本 https://github.com/ambiot/ambd_arduino/tree/master/Arduino_zip_libraries
请按照以下说明进行安装操作 https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries
确保在以下位置找到patch文件并安装 https://github.com/ambiot/ambd_arduino/tree/master/Ameba_misc/
打开范例, “Files” -> “Examples” -> “TensorFlowLite_Ameba” -> “magic_wand”.

上传代码并在上传完成后按Ameba上的重置按钮。
保持加速感测器稳定,使x轴的正极指向右侧,z轴的正极指向上方,按照所示形状移动加速感测器,使其平稳运动1至2秒钟,避免剧烈运动。

如果Tensorflow Lite模型可以识别移动,则应该看到相同形状的输出到Arduino串行监视器。对应于不同的识别手势,不同的LED将亮起。
请注意,机翼形状易于实现,而坡度和环形形状则更难于正确定位。

程式码说明

有关TensorFlow Lite for Microcontrollers的更多信息,请参考以下网址: https://www.tensorflow.org/lite/microcontrollers

请先确认已安装QQ通讯软体