BTW, even the very simple exemple sketch don’t behave as expected:
/*
Blink
https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(10000); // wait for a second
}
Seeed Studio XIAO nRF52840 (Sense) has an onboard 3-in-one LED which is user-programmable. Now you will learn how to control the RGB colors one-by-one using Arduino!
You first have to understand that the behavior of this LED is not as usual when controlled by the code. The LED turns ON when we give a LOW signal and it turns OFF when we give a HIGH signal. This is because this LED is controlled by a common anode and will light up only with a low-level signal.
But the next step is that I want to use BLE, with adafruit library. Indeed, the blue LED is acting opposite to expected. It is ON when BLE is deactivated and OFF when BLE is activated. Do I have to parse all Adafruit BLE code to add conditional directive as above? Any suggestion?
Thanks all for your answers. I may completely switch off the BT LED for the final project but I will start to have the expected behaviour following @hobbya suggestion.