Skip to content

Commit 75f68b9

Browse files
committed
turn off white led if disconnect without disable
1 parent 9fb72b6 commit 75f68b9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

libraries/Bluefruit52Lib/examples/Peripheral/bluefruit_playground/bluefruit_playground.ino

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,16 @@ void disconnect_callback(uint16_t conn_handle, uint8_t reason)
421421
(void) conn_handle;
422422
(void) reason;
423423

424+
#if defined(ARDUINO_NRF52840_CLUE) || defined(ARDUINO_NRF52840_FEATHER_SENSE)
425+
apds9960.enableGesture(false);
426+
apds9960.enableProximity(false);
427+
apds9960.enableColor(false);
428+
#endif
429+
430+
#ifdef ARDUINO_NRF52840_CLUE
431+
digitalWrite(PIN_LED2, LOW);
432+
#endif
433+
424434
Serial.println();
425435
Serial.print("Disconnected, reason = 0x"); Serial.println(reason, HEX);
426436
}

0 commit comments

Comments
 (0)