Skip to content

Commit

Permalink
RGB LED update for USB connection
Browse files Browse the repository at this point in the history
  • Loading branch information
zjwhitehead committed Feb 27, 2024
1 parent 68c1adf commit e8429e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/sp140/extra-data.ino
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,10 @@ void resetDeviceData() {
}

// ** Logic for WebUSB **
// Callback for when the USB connection state changes
void line_state_callback(bool connected) {
digitalWrite(LED_SW, connected);
setLEDColor(connected ? LED_BLUE : LED_GREEN);
setLEDs(connected);

if ( connected ) send_usb_serial();
}
Expand Down

0 comments on commit e8429e5

Please sign in to comment.