LED Reference
Overview
iReporter can drive hardware LEDs on an Arduino or compatible serial device to provide visual indicators for active crash/incident timers and the Top X Cars approach warning.
Serial Protocol
iReporter communicates with the serial device using a simple text-based protocol over the configured COM port at 9600 baud. Each LED command is a single line in the format:
LED;{COLOUR};{STATE};Where:
- COLOUR — one of:
RED,BLUE,GREEN,AMBER - STATE —
1to turn the LED on,0to turn it off
Examples:
LED;RED;1; (turn red LED on) LED;RED;0; (turn red LED off) LED;AMBER;1; (turn amber LED on)
LED Assignments
| Feature | Setting | Behaviour |
|---|---|---|
| Crash Capture | Timeout LED (in Crash Capture settings) | Steady ON while |
| Incident Capture | Timeout LED (in Incident Capture settings) | Steady ON while |
| Top X Approaching | Approach LED (in Top X Cars settings) | ON when a top-X car is within the approach gap AND more than 1 lap ahead |
Timed vs No Timeout LED Behaviour
The crash and incident LEDs behave differently depending on the timeout setting:
| Timeout Setting | LED Behaviour | Data Cleared When |
|---|---|---|
| Timed (1–60s) | Stays ON for the full timeout duration, then turns OFF | Timeout expires |
| No Timeout (0) | Flashes ON for 600ms on detection, then turns OFF | Next crash/incident is detected (overwrites previous) |
The brief flash in No Timeout mode confirms that a crash or incident has been captured without implying it is still pending — the data remains available in message variables indefinitely.
Colour Options
| Option | Description |
|---|---|
| None | No LED output for this feature |
| RED | Red LED |
| BLUE | Blue LED |
| GREEN | Green LED |
| AMBER | Amber / orange LED |
Notes
- iReporter only sends a new LED command when the state changes — it does not repeatedly send the same command.
- Multiple features can use different colours simultaneously (e.g. RED for crash, AMBER for incident).
- If two features are assigned the same colour, the last state change wins. It is recommended to assign a unique colour to each feature.
- The COM port and baud rate (9600) are fixed. Ensure your Arduino sketch listens on 9600 baud and parses the
LED;COLOUR;STATE;format.