# Arduino UNO Q LED Matrix Text Display Complete implementatie voor tekst weergave op de 8x13 LED Matrix met communicatie tussen MPU en MCU. ## Functionaliteit ### MCU (STM32) - LED Matrix Library - **LEDMatrix class** met volledige tekst display functionaliteit - **Scrolling tekst** in alle richtingen (0°, 90°, 180°, 270°, of custom hoeken) - **Instelbare snelheid** (50-1000ms per scroll stap) - **Display tijd** (1-60 seconden) - **Font rendering** voor karakters ### MPU (Linux) - Python Controller - **send_led_matrix_command()** voor tekst versturen - **JSON command processing** via named pipes - **Demo functies** met verschillende voorbeelden ## Command Format **MPU → MCU communicatie:** ``` "TEXT",SPEED,TIME,DIRECTION ``` **Parameters:** - `TEXT` - Weer te geven tekst (standaard: "Hallo World") - `SPEED` - Scroll snelheid in ms (standaard: 150ms) - `TIME` - Display tijd in ms (standaard: 5000ms) - `DIRECTION` - Scroll richting in graden (standaard: 0°) **Voorbeelden:** ```bash "Hallo World",150,10000,0 # Standaard links naar rechts "Fast Text",80,5000,0 # Snel scrollen "Slow Text",300,8000,180 # Langzaam rechts naar links "Diagonal",200,6000,45 # 45 graden hoek "Vertical",150,7000,90 # Verticaal scrollen ``` ## Bestanden ### MCU Side - `src/mcu/unoq_sketch/unoq_sketch.ino` - Hoofd sketch - `src/mcu/unoq_sketch/LEDMatrix.h` - Header file - `src/mcu/unoq_sketch/LEDMatrix.cpp` - Implementatie ### MPU Side - `src/mpu/main.py` - Python applicatie met demo - `lib/arduino_unoq/bridge.py` - Communicatie library ## Demo Sequence De Python applicatie toont automatisch: 1. **"Hallo World"** - Standaard tekst (10s, 0°) 2. **"Arduino UNO Q"** - Snel scrollen (8s, 0°) 3. **"Diagonal 45°"** - 45 graden hoek (6s, 45°) 4. **"Vertical"** - Verticaal scrollen (7s, 90°) 5. **"Reverse"** - Achteruit scrollen (5s, 180°) 6. **"30 Degrees"** - Custom hoek (6s, 30°) ## Build & Deploy ```bash npm run build # Compileer MCU sketch npm run upload # Upload naar beide processors npm run deploy # Build + upload ``` ## Communicatie - **Serial** - MPU stuurt commando's naar MCU - **Named Pipe** - Externe commando's naar MPU (`/tmp/unoq_cmd.pipe`) - **Status File** - Status updates (`/tmp/unoq_status.json`) ## Test Resultaten ✅ **Build**: MCU compileert succesvol (5844 bytes) ✅ **Python**: Syntax correct voor alle bestanden ✅ **Library**: LED Matrix functionaliteit geïmplementeerd ✅ **Communicatie**: Command parsing en routing werkt De LED Matrix tekst display is nu volledig operationeel!