Vidor 4000 LED_BUILTIN LOW is HIGH

When I run following blink code it stays 10s on HIGH which is the opposite behavior.

void setup() { pinMode(LED_BUILTIN, OUTPUT); }

void loop() { digitalWrite(LED_BUILTIN, HIGH); delay(2000); digitalWrite(LED_BUILTIN, LOW); delay(10000); }

I also checked the WifiNina > Ap_SimpleWebServer example and clicking on High link actually turns off the LED and vice versa. I also tried with 0 and 1 instead of LOW and HIGH respectively to see if constant values has changed.

Regarding to the schematic the cathodes of the user (RGB) led are driven by control signals (PB08 of SAM D21 is driving "R") whereas the anode is tight to Vcc (+3.3 V). So the behavior you observe is what is to be expected with this hardware constellation ...

Is this intended behavior or hardware bug? I don't expect to see LED off when I set it to be HIGH in my code and vice versa.

It's not a bug. Active LOW is quite common. You just need to get used to LOW being a state rather than assuming "HIGH means on".

I generally treat HIGH and LOW as "magic numbers" in my code. Something like this:

const byte LEDonState = LOW;
const byte LEDoffState = HIGH;

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, LEDoffState); 
  delay(2000);                       
  digitalWrite(LED_BUILTIN, LEDonState); 
  delay(10000);
}