Skip to content

Commit

Permalink
turn off white led if disconnect without disable
Browse files Browse the repository at this point in the history
  • Loading branch information
hathach committed Mar 6, 2020
1 parent 9fb72b6 commit 75f68b9
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,16 @@ void disconnect_callback(uint16_t conn_handle, uint8_t reason)
(void) conn_handle;
(void) reason;

#if defined(ARDUINO_NRF52840_CLUE) || defined(ARDUINO_NRF52840_FEATHER_SENSE)
apds9960.enableGesture(false);
apds9960.enableProximity(false);
apds9960.enableColor(false);
#endif

#ifdef ARDUINO_NRF52840_CLUE
digitalWrite(PIN_LED2, LOW);
#endif

Serial.println();
Serial.print("Disconnected, reason = 0x"); Serial.println(reason, HEX);
}
Expand Down

0 comments on commit 75f68b9

Please sign in to comment.