Programming
Microncontrollers -
What, Why, How, TinyML
Robert John
GDE, ML & GCP
Lagos
Intro to MCUs
What is a Microcontroller
● A computer
● Does only one thing
● Inputs from sensors or MCU
● Controls MCUs, motors,
actuators, LEDs, etc
● Use case: control home
heating/cooling
Image courtesy of Sparkfun
Why Program Microcontrollers
● Billions of MCU!
● More than desktops,
browsers, mobile phones
● Somebody has to do it
Photo by Ivan Shilov on Unsplash
Photo by Alan J. Hendry on Unsplash
Example Applications
● Household devices
○ Fridge
○ Washing machine
○ Microwave
● Smarthome
○ Door locks
○ Cameras
○ Speakers
○ Door bells
○ Fire TV
○ Chromecast
● Wearables
○ Watches
○ Earphones
○ Rings
○ Glasses
● Healthcare
○ Hand-held
○ Smart wearables
● Industrial
○ Factories
○ Farms
○ Weather stations
How to Program a Microcontroller
1. Know C/C++ (or MicroPython, etc)
2. Understand Electronic Circuits
3. Read Documentation/Specifications
4. Have a love of making things.
a. Micro:bit
b. Arduino
c. Raspberry Pi
d. Sparkfun
e. Sony
Image courtesy of Raspberry Pi
Example Board
Pinout Diagram
Wakeword Detection
(Workshop)
Pre-Workshop Survey
https://bit.ly/3IhuiJ2
Electronics
Machine Learning
Programming
Programming Wake-word Detection
● Collect Data
● Train an NLP model
● Shrink the model to fit MCU
● Write embedded program
● Transfer model into program
● Implement a pipeline for
streaming sound from
microphone to model
● Compile
● Flash MCU
Learn More
● Arm Website link
● Arm Developers link
● Sparkfun Edge link
● TinyML Foundation link
● TinyML Course link
● Embedded Systems Essentials with Arm link
● My blog link
● Sparkfun Board Setup link
●
Post-Workshop Survey
https://bit.ly/3GaxiF2
Thanks

TinyML at DevFestLagos21