Welcome to TinyNML, a growing collection of embedded machine learning projects developed in the Neuromechatronics Lab at Carnegie Mellon University. This repository focuses on deploying ML models on resource-constrained microcontrollers like the Raspberry Pi Pico and other edge devices.
Whether it's motion recognition, gesture control, biosignal processing, or edge AI inference pipelines, this repository aims to provide a collaborative platform for lab members to prototype, share, and deploy their models on embedded hardware.
- Build scalable and modular TinyML applications on embedded hardware
- Combine mechatronics, biosignals, and ML inference for real-world applications
- Provide a collaborative platform for lab members to prototype and share models
Project Name | Description | Language | Hardware |
---|---|---|---|
pico_motion_classifier |
Real-time circular motion classification using MPU6050 | C++ | Raspberry Pi Pico W + MPU6050 + SSD1306 |
gesture_oled_demo (coming soon) |
Accelerometer gesture display using Edge Impulse on CircuitPython | CircuitPython | Pico W + MPU6050 + OLED |
keyword_detect (coming soon) |
Audio keyword spotting | CircuitPython | Pico + MEMS microphone |
These steps guide you through setting up the toolchain. If using a Windows PC, it is recommended to use Ubuntu under WSL2 for compiling UF2 firmware for the Raspberry Pi Pico.
Run the following in your terminal for compilation tools:
sudo apt update
sudo apt install -y cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential git python3-pip
Clone the Pico SDK and TinyNML repositories:
git clone https://github.com/raspberrypi/pico-sdk.git
git clone https://github.com/Neuro-Mechatronics-Interfaces/TinyNML.git
(Optional) Set the PICO_SDK_PATH
environment variable:
- Windows:
export PICO_SDK_PATH=/path/to/pico-sdk
- Linux:
echo "export PICO_SDK_PATH=~/pico/pico-sdk" >> ~/.bashrc source ~/.bashrc
- Download the latest CircuitPython firmware for your Pico W from CircuitPython Downloads.
- Press and hold the BOOTSEL button on the Pico W while connecting it to your computer via USB. This will mount the Pico as a mass storage device.
- Copy the downloaded
.uf2
file to the Pico W. It will reboot and appear as a new drive namedCIRCUITPY
. - Install any required libraries:
- Download the latest Adafruit CircuitPython bundle.
- Copy and include only the necessary libraries from the bundle to the to the
lib
folder in theCIRCUITPY
drive.