- Complete MPU-MCU communication setup - LED Matrix text display with configurable parameters - Configuration management with personal data protection - Git template with .gitignore for sensitive data - Automated build and deployment scripts - SSH key management and service scripts
2.5 KiB
2.5 KiB
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:
"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 sketchsrc/mcu/unoq_sketch/LEDMatrix.h- Header filesrc/mcu/unoq_sketch/LEDMatrix.cpp- Implementatie
MPU Side
src/mpu/main.py- Python applicatie met demolib/arduino_unoq/bridge.py- Communicatie library
Demo Sequence
De Python applicatie toont automatisch:
- "Hallo World" - Standaard tekst (10s, 0°)
- "Arduino UNO Q" - Snel scrollen (8s, 0°)
- "Diagonal 45°" - 45 graden hoek (6s, 45°)
- "Vertical" - Verticaal scrollen (7s, 90°)
- "Reverse" - Achteruit scrollen (5s, 180°)
- "30 Degrees" - Custom hoek (6s, 30°)
Build & Deploy
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!