In this tutorial series, Shawn introduces the concept of Tiny Machine Learning (TinyML), which consists of running machine learning algorithms on microcontrollers.
In this episode, we create an (as simple as possible) Arduino sketch to load our TensorFlow Lite model file and run inference. The model is used to predict values of a sinewave, which we can graph using the Serial Plotter. An LED is hooked up to the Arduino to demonstrate how to connect hardware to machine learning.
On the previous episode ( • Intro to TinyML Part 1: Training a Ne... ), we developed a simple 3-layer neural network that predicts values of the sine function when given a value between 0 and 2π. While this is a mostly useless way to calculate a sinewave, it provides a great demonstration for creating a neural network that is small enough to run on a microcontroller.
TensorFlow has a pre-built library that we can install in Arduino. We use the functions from this library to load our model and run inference to make predictions. Note that at the time this video was made, TensorFlow Lite for Microcontrollers is still under heavy development, so many of the features can change on a regular basis.
Before starting, we recommend you watch the following videos:
What is Edge AI • Intro to Edge AI: Machine Learning + ...
Getting Started with Machine Learning Using TensorFlow and Keras • Getting Started with TensorFlow and K...
Code for this video can be found here: https://www.digikey.com/en/maker/proj...
Project Link: https://www.digikey.com/en/maker/proj...
Product Links:
Arduino Nano 33 BLE Sense https://www.digikey.com/product-detai...
Related Videos:
Intro to Edge AI
• Intro to Edge AI: Machine Learning + ...
Getting Started with Machine Learning Using TensorFlow and Keras
• Getting Started with TensorFlow and K...
Intro to TensorFlow Lite Part 1: Wake Word Feature Extraction
• Intro to TensorFlow Lite Part 1: Wake...
Intro to TensorFlow Lite Part 2: Speech Recognition Model Training
• Intro to TensorFlow Lite Part 2: Spee...
Intro to TensorFlow Lite Part 3: Speech Recognition on Raspberry Pi • Intro to TensorFlow Lite Part 3: Spee...
Low-Cost Data Acquisition (DAQ) with Arduino and Binho for Machine Learning
• Low-Cost Data Acquisition (DAQ) with ...
Intro to TinyML Part 1: Training a Neural Network for Arduino in TensorFlow
• Intro to TinyML Part 1: Training a Ne...
Related Articles:
What is Edge AI?
https://www.digikey.com/en/maker/proj...
Getting Started with Machine Learning Using TensorFlow and Keras
https://www.digikey.com/en/maker/proj...
TensorFlow Lite Tutorial Part 1: Wake Word Feature Extraction
https://www.digikey.com/en/maker/proj...
TensorFlow Lite Tutorial Part 2: Speech Recognition Model Training
https://www.digikey.com/en/maker/proj...
TensorFlow Lite Tutorial Part 3: Speech Recognition on Raspberry Pi
https://www.digikey.com/en/maker/proj...
Low-Cost Data Acquisition (DAQ) with Arduino and Binho for ML
https://www.digikey.com/en/maker/proj...
Intro to TinyML Part 1: Training a Model for Arduino in TensorFlow
https://www.digikey.com/en/maker/proj...