universalbit-dev

Arduino Light AI: On-Device ANN & Reinforcement Learning

This repository implements lightweight Machine Learning (“Light AI” or TinyML) algorithms running natively and entirely offline on highly constrained microcontrollers. It showcases how neural networks, pattern classifiers, and reinforcement learning can execute directly on edge silicon without cloud dependencies.


🧠 The Light AI Models

1. 7-Segment Digit Recognizer (ArduinoANN.ino)

2. Fibonacci Sequence Classifier (ArduinoANNFIB.ino)

3. Reinforcement Learning Agent (ArduinoRL.ino)

🛠️ Clone & Quick Start

To get started, clone the repository and navigate into the project directory:

git clone https://github.com/universalbit-dev/universalbit-dev.git
cd universalbit-dev/ann/

Deploying Firmware via CLI (No IDE Required)

You can compile and flash either model using the local sandbox script arduino_ai_uploader.sh.

# Make the deployment script executable
chmod +x arduino_ai_uploader.sh

# Run the automated uploader (Handles serial ports and chip auto-probing)
sudo ./arduino_ai_uploader.sh

What the Script Does:

  1. Dynamic Scanning: Automatically scans your workspace directory and lists all .ino files (dynamically parsing ArduinoANN.ino, ArduinoANNFIB.ino, and ArduinoRL.ino into the menu selection).
  2. Local Sandboxing: Installs a localized, sandboxed instance of arduino-cli inside your home directory so your system packages remain unmodified.
  3. Serial Discovery: Scans active USB lines to auto-detect your active connection port (e.g., /dev/ttyUSB1).
  4. Hardware Probing: Queries the hardware signature to determine if the connected board is an AVR (Nano/Uno), ESP8266, or ESP32 chip.
  5. Clean Builds: Isolates compiler tasks inside a temporary /tmp environment to bypass multiple-definition or artifact conflicts.

🔌 Hardware Setup & Requirements

The firmware is fully compatible with standard AVR (Nano/Uno) and 32-bit Expressif (ESP8266/ESP32) boards.

Arduino Nano

ESP8266 and ESP32


⚡ Important Operational Notes


⚖️ License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for the full terms and conditions.