Jump to content
Electronics-Lab.com Community

Machine Learning with ARM Cortex M33 Microcontroller


MENG XI
 Share

Recommended Posts

Machine Learning and TensorFlow Lite for Microcontrollers(TFL4M)
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, nor any standard C or C++ libraries, not even dynamic memory allocation.

Ameba and TFL4M
Ameba is an easy-to-program hardware 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. 

What's best? Ameba can be programmed using Arduino IDE, MicroPython and standard C SDK which are all open-source!

 

TFL for Microcontrollers--Hello World

Hello World is by far the easiest ML model that can be demo, you only need a LED,or not at all. Here is how we run TFL4M with Hello World,

Materials

• Ameba D [RTL8722 CSM/DM] x 1
• LED x 1

Example

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://www.arduino.cc/en/guide/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” -> “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

 

Need more resources to get started with Ameba?

Check out the

1. Ameba Official website at https://bit.ly/AmebaOfficialWebsite

2. Ameba Forum at https://bit.ly/AmebaForum

3. Ameba Facebook at https://bit.ly/AmebaFB

 

 

Link to comment
Share on other sites

  • 4 months later...

Hello, thank you so much for sharing this with us. I was searching for it online and I am glad I have found your post. I am a college student and I have to submit a project at the end of this year. And for that I am searching about this. I also want to write best dissertation essay but I don't worry about it because one of my best friend will help me out in writing my essay assignments.

Link to comment
Share on other sites

Thanks a lot for the explanation. Machine learning is one of those areas that interests me very much as part of my university studies. I've been researching this question and more and more I find thoughts that confirm the future of machine learning. I study at university and besides the topic of machine learning, I study nursing. At https://edubirdie.com/blog/nursing-research-topics you can find a very high quality blog and article with topics for nursing research in 2021.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
  • Create New...