AI-Migo

Meet AI-Migo: Your Friendly AI-Powered ASL Buddy!
Talking to humans when you can't use words sounds exhausting; that's why a friend would be great. One who doesn't feel
AI-Migo is a user-friendly AI companion that can help you learn and practice American Sign Language (ASL) through real-time hand sign recognition, as well as "talking" your heart out with it. If you are a curious student, language aficionado, or just a computer vision aficionado, AI-Migo makes the learning process accessible in sign language more engaging, fun, and accessible!
With YOLOv11 and a dataset that is specially trained for it, AI-Migo can recognize ASL hand signs from A to Z. Just hold up your hand in front of the camera, and if the model is 60% or more confident, it'll let you know which letter you're signing. It's the same as having a friendly friend nearby—hence the name: AI-Migo (AI + Amigo)! (Nice beautiful name play, I know.)
In this tutorial, I'll walk you through how I made it—from gathering data and labeling it to training a model and visualizing predictions. By the end of it all, you'll be able to make your own smart ASL buddy!
Supplies
1 x 64x64 RGB LED Matrix Panel - 2mm Pitch [ID:5362] = $49.95 / €45.95
1 x Diffused Green 5mm LED (25 pack) [ID:298] = $4.00 / €3.68
1 x 5mm Chromed Metal Narrow Bevel LED Holder - Pack of 5 [ID:2176] = $2.95 / €2.71
1 x Diffused Red 5mm LED (25 pack) [ID:299] = $4.00 / €3.68
1 x Through-Hole Resistors - 470 ohm 5% 1/4W - Pack of 25 [ID:2781] = $0.75 / €0.69
1 x Premium Female/Female Jumper Wires - 40 x 6" [ID:266] = $3.95 / €3.63
1 x Premium Female/Male 'Extension' Jumper Wires - 40 x 12" (300mm) [ID:824] = $7.95 / €7.31
1 x Adafruit RGB Matrix Bonnet for Raspberry Pi [ID:3211] = $14.95 / €13.75
1 x 5V 4A (4000mA) switching power supply - UL Listed [ID:1466] = $14.95 / €13.75
1 x Buzzer 5V - Breadboard friendly [ID:1536] = $0.95 / €0.87
1 x Vibrating Mini Motor Disc [ID:1201] = $1.95 / €1.79
1 x Mini External USB Stereo Speaker [ID:3369] = $12.50 / €11.50
1 x Half-Size Breadboard with Mounting Holes [ID:4539] = $10.00 / €9.20
1 x Premium Male/Male Jumper Wires - 20 x 12" (300mm) [ID:1955] = $3.95 / €3.63
suggestion if u dont want to wire 40 cables: 40-pin GPIO Stacking Header - 15mm pins - 2x20 Female = $2,65 / € 2,29
Total: $139.5 / €128,19
All of these are from the shop Adafruit. Other contributors or different times may have different prices.
BOM file <- be sure to look through this!!
The Matrix Setup

1. Prepare the Hardware
Components Needed:
- Raspberry Pi 5 (powered off)
- Raspberry Pi 5 power cable + power supply
- 64x64 RGB LED Matrix panel
- RGB Matrix Bonnet
- Extra 5V power supply (for the matrix)
- Provided cables (grey ribbon, red & black power wires)
2. Solder the Bonnet
- Under the bonnet are 3 layers of components—only solder the bottom 2, not all three.
3. Connect Power Cables
- Red wire ➜ + terminal on the matrix
- Black wire ➜ - terminal (GND) on the matrix
⚠️ Double-check polarity; reversed wires can damage the matrix.
4. Attach Bonnet to Raspberry Pi
- Align the bonnet’s GPIO header with the Pi’s GPIO pins.
- Press down gently but firmly.
5. Connect Grey Data Cables
Single Matrix Setup:
- Use the IN port on the matrix.
- Plug the grey ribbon cable from the bonnet’s output into the IN port on the matrix.
- Ignore the OUT port unless chaining multiple matrices.
6. Power Up
- Connect 5V ≥ 4A to the bonnet.
- Power the Pi using its standard power supply.
- Turn on the Pi.
7. Test Code: Colour Cycle Script
Key Troubleshooting
No Display?
- Recheck all solder joints.
- Ensure the grey cable is fully inserted in the IN port.
- Confirm power is connected to the bonnet, not just the Pi.
Flickering or Glitches?
- Use a power supply that delivers at least 4A.
- GPIO Conflicts?
- Double-check which pins your matrix uses.
- Avoid using the same pins for other devices.
Advanced Notes
Daisy-Chaining Matrices:
- Connect the OUT of matrix 1 ➜ IN of matrix 2.
- In /boot/config.txt, add:
Install Required Library:
- Adafruit RGB Matrix Bonnet Setup Guide (also a visual is found of the soldering component)
Safety Tips
- Always power off before making hardware changes.
- Avoid touching pins while the Pi is powered on.
- Don't overheat solder pads—take breaks during soldering.
8. Video for visuality at the end of the document
Outputs + Breadboard
1. Prepare the Hardware
Components Needed:
- Raspberry Pi 5 (powered off)
- Raspberry Pi 5 power cable + power supply
- 64x64 RGB LED Matrix panel (already attached, powered off)
- Provided cables: 9 female-to-male jumper wires, 1 female-to-female jumper
- 2 LEDS (mine are 5 mm in diameter, and also one is green and the other red)
- 2 transistors, 470 ohm
- Breadboard (i used an half one; you can use a big one if u have those)
2. Decide your GPIO pins
- Go to Adafruit RGB Matrix Bonnet Setup Guide to look at which GPIO's are free or not
- I choose for my GPIO pins:
- GPIO pin 18 -> physical pin 12 (Green LED)
- GPIO pin 25 -> physical pin 22 (
- GPIO pin 19 -> physical pin 35
- Choose your 5V and ground; you need one of them each, and the matrix is using the other. I choose these:
- physical pin 4 (5V)
- physical pin 6 (Ground)
3. Attaching '+' and '-'
I prefer to grab a red and brown/blue cable for this since those are mostly used for '+' and '-'. This is pretty simple to do.
- for 5V Grab your (red) female-to-male jumper wire and attach it to the breadboard. There is this red line at the side and a '+' on top and bottom of it. Attaching your wire means the whole stripe as a '+'
- The same goes for your ground, just that it has a black line against the inward side. Attach your wire, and the whole streak is ground.
4. Attaching the two LEDS
- Look at the two metal pins, as you would notice one is shorter than the other. The smallest one is considered the '-' and the longer one is considered the '+' of the LEDs.
- Make sure your raspberry pi and the matrix don't have their charger in and are powered off
- You take the shorter one and put it in one of your holes from the breadboard where the letters are.
- After that, you grab one of the transistors and attach one pin to the same row as your short pin and the other pin in the '-' line
- put the longest one into another row, attach there a jumper wire to your GPIO pin of choice.
- Repeat that for the second LED, or more times if you use more than one.
5. Attaching the buzzer
- Just like the LEDs, the buzzer has a shorter pin and a longer pin. The longer pin is '+' and the shorter pin is '-'.
- Put the buzzer on your breadboard on two different rows
- By where you put the longest one, in the same row, put a wire towards the GPIO pin you use for your buzzer
- by the shortest one, you just attach a Male-To-Male to it towards your '-' line from your board
6. Buzzer and LEDs test.
buzzer_test.py
leds_test.py
7. Video for visuality at the end of the document
Assemble the Frame (Laser Cut)
For this step, I used a laser cutter to create the frame and housing for the project. If you're using a similar method, feel free to download and use the SVG files I’ve attached, or you're welcome to design your own to fit your style or dimensions. all together for me would be a simple cube from 455 mm x 330mm
Once all your laser-cut pieces are ready:
- Prepare your parts: Lay out each piece and make sure all parts were cut correctly and align as expected. If something is off, lightly sand or recut as needed.
- Assemble the structure:
- Begin by connecting the base and side walls.
- Use wood glue for strong joints. Hold or clamp them in place for a few minutes so they don't slip.
- For extra strength, you can use small nails or brads to pin the sides together after glueing. Just make sure they don’t split the material.
- Let it dry: Allow the glued structure to dry completely before adding any electronics. This helps prevent shifting or damage while handling.
- You can always paint it, whatever you want. i took inspiration from the older Polaroid cameras with the rainbow stripe
Tip: If your frame includes slots or mounting holes for the LED matrix or breadboard, test-fit them now before final assembly.
Model Coding: Capture Hand Gestures
Now that the hardware is built, it's time to start coding the machine learning model!
I used MediaPipe to track 21 keypoints on my hand and saved the data into .csv files. This is how I trained a model to recognise hand gestures for every letter of the alphabet. You can do it your own way, but I’ve included my full process and code below.
1. Capture Keypoints with a USB Camera
This script opens your camera, cycles through every camera port and records the hand landmarks:
Each letter you record will get its own .csv file in the Model_V0.2/data folder.
2. Merge All Letter Files into One Dataset
Now combine all the individual .csv files into one big dataset for training:
3. Train a Random Forest Classifier
Finally, train your gesture recognition model!
You can also try other classifiers like MLPClassifier (Multi-Layer Perceptron) if your dataset gets larger!
The Code
Folder Structure and Setup
You should have two separate folders for this project:
- One for your laptop, where the AI model runs. I called this folder AI.
- One for your Raspberry Pi, called RPI.
Since running a full machine learning model directly on a Raspberry Pi isn't ideal (it's slower and limited in resources), we're going to let the laptop do the heavy work, and have the Raspberry Pi send data to it.
We’ll use Sockets for this. Your laptop acts as the server, and the Raspberry Pi is the client—they talk to each other over the local network.
Also important: Your trained model file (called gesture_model.pkl) stays in the AI folder on your laptop.
AI (Laptop) Folder
This contains:
- The collect_date.py file + the data folder
- Format_csv.py file
- hand_gastures.csv (data merged into one .csv)
- The training_model.py file
- Your trained ML model: gesture_model.pkl
- A Python script (like server.py) that:
- Loads the model
- Listens for incoming data from the Raspberry Pi
- Runs predictions
- Sends the result back
server.py code:
RPI (Raspberry Pi) Folder
This contains:
- Your test codes
- Your folder with speaker audio's
- Your folder with videos/gifs that will be displayed on matrix
- A script (like client.py) that:
- Uses OpenCV to capture hand or finger positions
- Sends that data to the laptop via a socket connection
- (Optionally) receives and displays the prediction
code client.py:
Tip: always do first your server and than your client
You Did It!
If you've followed along this far — congrats!
You’ve successfully built a real-time gesture recognition system using a Raspberry Pi and a laptop running machine learning.
What You’ve Accomplished
- Captured hand or finger movement using a camera and OpenCV
- Sent the keypoint data from your Pi to your laptop using sockets
- Ran an AI model (gesture_model.pkl) on your laptop to predict gestures
- Sent predictions back to the Pi — possibly to control something or display output
All that, and you didn’t overload your Raspberry Pi. Smart move.
Thanks for reading!
If this Instructable helped you, please consider:
- ❤️ Giving it a favorite
- 💬 Leaving a comment or question
- 🔁 Sharing it with someone else learning AI or Raspberry Pi
If you want to suggest something else? Then go ahead! i am just a first-year student and not everything will be that greatly done, i am open to any critic as long as it doesnt make me cry
Github link to every coding and my own code and model