How tobyy85/pi-play works
Pi-Play is an Electron-based Raspberry Pi in-car dashboard integrating Arduino hardware. The user-facing workflow is to open dashboard apps for navigation, media, phone, radio, and vehicle information; hardware sensor readings and controls are another major capability. The excerpts show Arduino sensor registration, change detection, and serial output, but not the Electron IPC wiring or most app-service implementations, so those relationships are left unverified rather than presented as confirmed calls.
Main entry points: services Device services · main.tsx React renderer · SensorManager.cpp Sensor manager · SensorHandler.cpp Sensor handler
Components 23
Application shell
- Electron main process
app/src/main/main.ts - Window manager
app/src/main/managers/windowManager.ts - React renderer
app/src/renderer/main.tsx - App router
app/src/renderer/routes/router.tsx
Dashboard apps
- App catalog
app/src/renderer/features/apps - Maps and GPS
app/src/renderer/features/appMaps - Music player
app/src/renderer/features/appMusic - Phone and calls
app/src/renderer/features/appPhone - Radio
app/src/renderer/features/appRadio - Reverse camera
app/src/renderer/features/appReverseCamera - Vehicle overlays
app/src/renderer/features/brightness
Device services
- Service bootstrap
app/src/main/bootstrap/services.ts - Device services
app/src/main/services - Shared contracts
app/src/shared
Arduino firmware
- Sensor setup
hardware/arduino/sensors.cpp - Sensor manager
hardware/arduino/src/SensorManager.cpp - Sensor handler
hardware/arduino/src/SensorHandler.cpp - Serial communication
hardware/arduino/src/SerialCommunication.cpp - Sensor hardware
hardware/arduino/src/sensors - Engine detector
hardware/arduino/engineDetector.cpp
Parking hardware
- Ultrasonic sensing
hardware/parkingSensors/src/UltrasonicSensor.cpp - Parking serial output
hardware/parkingSensors/src/serialCommunication.cpp
Other components
- Driver
Connections 22
- Driver → React renderer: uses dashboard
- React renderer → App router: renders
app/src/renderer/main.tsx - App router → App catalog: routes apps
- Driver → App catalog: selects app
- Electron main process → Window manager: manages window
- Service bootstrap → Device services: initializes services
- React renderer → Device services: exchanges IPC
- Device services → Shared contracts: uses contracts
- Sensor setup → Sensor manager: registers sensors
hardware/arduino/sensors.cpp - Sensor setup → Sensor hardware: reads hardware
hardware/arduino/sensors.cpp - Sensor manager → Sensor handler: updates handlers
hardware/arduino/src/SensorManager.cpp - Sensor handler → Serial communication: sends readings
hardware/arduino/src/SensorHandler.cpp - Sensor manager → Sensor handler: dispatches requests
hardware/arduino/src/SensorManager.cpp - Engine detector → Serial communication: signals state
- Ultrasonic sensing → Parking serial output: reports distance
- Serial communication → Device services: sends serial data
- Device services → Maps and GPS: provides GPS data
- Device services → Music player: controls playback
- Device services → Phone and calls: provides call data
- Device services → Radio: controls radio
- Device services → Reverse camera: provides camera
- Device services → Vehicle overlays: provides controls