[RTL8722CSM/RTL8722DM] TensorFlow Lite - Hello World

Yahui Ji

May 14, 2021
6
Joined
May 14, 2021
Messages
6
Introduction to Google TensorFlow
TensorFlow (TF) is an end-to-end open-source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries, and community resources that lets researchers push the state-of-the-art in ML, and developers easily build and deploy ML-powered applications.
While TensorFlow Lite (TFL) for Microcontrollers is designed to run machine learning models on microcontrollers and other devices with only a few kilobytes of memory. The core runtime just fits in 16 KB on an Arm Cortex M3 and can run many basic models. It doesn't require operating system support, any standard C or C++ libraries, or dynamic memory allocation.
Ameba and TensorFlow Lite TFL
Ameba is an easy-to-program platform for developing all kinds of IoT applications. AmebaD is equipped with various peripheral interfaces, including WiFi, GPIO INT, I2C, UART, SPI, PWM, ADC. Through these interfaces, AmebaD can connect with electronic components such as LED, switches, manometer, hygrometer, PM2.5 dust sensors, …etc.
Hello World Example Running on Ameba RTL8722DM
The materials we are going to prepare only requires:

  • 1 x Ameba D RTL8722DM or RTL8722DM-mini, and
  • 1 x LED.

Example Guide
Download the Ameba customized version of TensorFlow Lite for Microcontrollers library at ambiot/ambd_arduino.
Follow the instructions at Arduino - Libraries to install it.
Ensure that the patch files found at ambiot/ambd_arduino are also installed.
Open the example, “Files” -> “Examples” -> “TensorFlowLite_Ameba” -> “hello_world”.

1-1.png

Upload the code and press the reset button on Ameba once the upload is finished.
Connect the LED to digital pin 10 and ground, ensuring that the polarity is correct. You should see the LED fade in and out rapidly.
In the Arduino serial plotter, you can see the output value of the Tensorflow model plotted as a graph, it should resemble a sine wave.

1-2.png

References
You can train your model with google collab by following this weblink:
Google Colaboratory
Code Reference
More information on TensorFlow Lite for Microcontrollers can be found at TensorFlow Lite for Microcontrollers
Find out more at:




Ameba MicroPython: [RTL8722CSM] [RTL8722DM] Timer – Periodical timer – Realtek IoT/Wi-Fi MCU Solutions



 
cropped-old-150x150.png
 www.amebaiot.com





Join in the community discussions at:




Ameba IoT Forum[RTL8722/RTL8195/RTL8710/...]



Share anything about Realtek Ameba or IoT information. Official website: http://www.amebaiot.com/en/ Forum: forum.amebaiot.com 分享 Ameba RTL8722/RTL8195/RTL8710/... 相關資訊及 Maker 的大小事,一同促進 IoT 產業的發展...
d4ZIVX-5C-b.ico
 www.facebook.com






63d53c0bea42e4687336650dbaeeeacd53293a6a.jpeg


Realtek Ameba IOT Developers Forum (RTL8722, RTL8195, RTL8710, RTL8720, BW16 Development board) - IOT / MCU Solutions 瑞昱開發者論壇 開發板 开發者论坛 开發板



Discuss anything about Ameba RTL8722 RTL8195 RTL8710, RTL8720, BW16 Development board or IOT / MCU Solutions
63d53c0bea42e4687336650dbaeeeacd53293a6a_2_32x32.jpeg
 forum.amebaiot.com





Purchase links for the various Realtek development boards can be found at:




Buy Ameba Boards – Realtek IoT/Wi-Fi MCU Solutions



 
cropped-old-150x150.png
 www.amebaiot.com



 
Last edited by a moderator:
Top