- 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 Template Project
Template voor Arduino UNO Q projecten met LED Matrix functionaliteit en configuratie management.
Project Structuur
ArduinoUNOQ/
├── config.json # Persoonlijke configuratie (niet in git)
├── config.example.json # Template configuratie
├── lib/ # Python libraries
│ ├── config_loader.py # Configuratie loader
│ └── arduino_unoq/
│ └── bridge.py # MPU-MCU communicatie
├── src/
│ ├── mpu/ # Linux/MPU kant
│ │ └── main.py # Python applicatie
│ └── mcu/ # MCU kant
│ └── unoq_sketch/
│ ├── unoq_sketch.ino
│ ├── LEDMatrix.h
│ └── LEDMatrix.cpp
├── scripts/ # Management scripts
│ ├── status.sh
│ ├── logs.sh
│ ├── restart.sh
│ └── stop.sh
├── build.sh # Build script
├── upload.sh # Upload script
├── setup_ssh.sh # SSH setup
└── package.json # NPM scripts
Snel Starten
1. Configuratie
# Kopieer template en pas aan
cp config.example.json config.json
# Bewerk config.json met je persoonlijke gegevens
2. SSH Setup
npm run setup
3. Build & Deploy
npm run build # Compileer MCU sketch
npm run upload # Upload naar beide processors
npm run deploy # Build + upload
Configuratie
Persoonlijke gegevens in config.json:
{
"arduino_uno_q": {
"hostname": "JOUW_UNOQ_IP",
"user": "arduino",
"ssh_key": "~/.ssh/arduino_unoq_key"
}
}
Belangrijk: config.json staat in .gitignore en wordt niet gecommit!
LED Matrix Functionaliteit
Command format: "TEXT",SPEED,TIME,DIRECTION
- TEXT - Weer te geven tekst
- SPEED - Scroll snelheid (50-1000ms)
- TIME - Display tijd (1000-60000ms)
- DIRECTION - Richting (0°, 90°, 180°, 270°, of custom)
Scripts
npm run status- Bekijk service statusnpm run logs- Bekijk live logsnpm run restart- Herstart applicatienpm run stop- Stop applicatie
Git Template Gebruik
Dit project is een template - kopieer en pas aan:
# Nieuw project maken
git clone <repository> mijn-project
cd mijn-project
rm -rf .git
git init
# Pas config.json aan
# Begin met ontwikkelen!
Veiligheid: Persoonlijke gegevens (IP, wachtwoorden, SSH keys) worden nooit gecommit door .gitignore.