Skip to content

Neuro-Mechatronics-Interfaces/TinyNML

Repository files navigation

TinyNML

License

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.

🧠 Project Goals

  • 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

🚀 Current Projects

Project Name Description Language Hardware
pico_motion_classifier Real-time circular motion classification using MPU6050 C++ Raspberry Pi Pico W + MPU6050 + SSD1306
pico_emg_gesture_classifier_circuitpython EMG-based gesture classification on CircuitPython CircuitPython + Python Pico W + EMG electrodes
pico_cnn_mnist_classifier CNN digit recognition with weight extraction (no TFLite) CircuitPython + Python Pico + OV7670 camera (optional)
gesture_oled_demo (coming soon) Accelerometer gesture display using Edge Impulse CircuitPython Pico W + MPU6050 + OLED
keyword_detect (coming soon) Audio keyword spotting CircuitPython Pico + MEMS microphone

⚙️ Getting Started with Pico SDK


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.

🔧 1. Install Dependencies

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

⚙️ Getting Started with CircuitPython


  1. Download the latest CircuitPython firmware for your Pico W from CircuitPython Downloads.
  2. 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.
  3. Copy the downloaded .uf2 file to the Pico W. It will reboot and appear as a new drive named CIRCUITPY.
  4. 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 the CIRCUITPY drive.

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

4 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors