user71144: I picked up my Arduino Nano 33 BLE Sense for the first time in a while and ran the classic "Blink" sketch to make sure it was alright. After slight usage, I wanted to play with the onboard LEDs. When I run the following code, the onboard LED does not turn on:
#define RED 22

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

void loop() {
    digitalWrite(RED, HIGH);
}

However, when I run the following code, the onboard LED does turn on and stays on - it doesn't blink:
#define RED 22

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

void loop() {
    digitalWrite(RED, LOW);
    delay(1000);
    digitalWrite(RED, HIGH);
}

What's happening? Is my Nano busted?

user61722: There are 3 LEDS on the Nano 33 BLE:

A power LED on pin 25 (yes, you can turn off the power LED programatically);
A built-in LED on pin 13;
An RGB LED with red on pin 22, green on pin 23, and blue on pin 24.

In the variant file, they are given names:
#define PIN_LED     (13u)
#define LED_BUILTIN PIN_LED
#define LEDR        (22u)
#define LEDG        (23u)
#define LEDB        (24u)
#define LED_PWR     (25u)

The power LED and the built-in LED are active-high, ie. you need to set their pin to HIGH to turn these LEDs on. The three LEDs in the RGB LED, however, are active-low.
This isn't well-documented as far as I know, and some example code snippets have it wrong too. A quick look at the schematic helps.
Also, as StarCat mentioned, you need two delay()s to make an LED blink.

71144: <p>I picked up my Arduino Nano 33 BLE Sense for the first time in a while and ran the classic &quot;Blink&quot; sketch to make sure it was alright. After slight usage, I wanted to play with the onboard LEDs. When I run the following code, the onboard LED does not turn on:</p>
<pre><code>#define RED 22

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

void loop() {
    digitalWrite(RED, HIGH);
}
</code></pre>
<p>However, when I run the following code, the onboard LED does turn on and stays on - it doesn't blink:</p>
<pre><code>#define RED 22

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

void loop() {
    digitalWrite(RED, LOW);
    delay(1000);
    digitalWrite(RED, HIGH);
}
</code></pre>
<p>What's happening? Is my Nano busted?</p>
 61722: <p>There are 3 LEDS on the Nano 33 BLE:</p>
<ul>
<li>A power LED on pin 25 (yes, you can turn off the power LED programatically);</li>
<li>A built-in LED on pin 13;</li>
<li>An RGB LED with red on pin 22, green on pin 23, and blue on pin 24.</li>
</ul>
<p>In the <a href="https://github.com/arduino/ArduinoCore-nRF528x-mbedos/blob/master/variants/ARDUINO_NANO33BLE/pins_arduino.h#L50" rel="noreferrer">variant file</a>, they are given names:</p>
<pre class="lang-cpp prettyprint-override"><code>#define PIN_LED     (13u)
#define LED_BUILTIN PIN_LED
#define LEDR        (22u)
#define LEDG        (23u)
#define LEDB        (24u)
#define LED_PWR     (25u)
</code></pre>
<p>The power LED and the built-in LED are active-high, ie. you need to set their pin to <code>HIGH</code> to turn these LEDs on. <strong>The three LEDs in the RGB LED, however, are active-low.</strong></p>
<p>This isn't well-documented as far as I know, and some example <a href="https://create.arduino.cc/editor/arduino_support/b128a04b-ae92-40b3-be19-18bb0cdf3194/preview?embed" rel="noreferrer">code snippets</a> have it wrong too. A quick look at the <a href="https://content.arduino.cc/assets/NANO33BLE_V2.0_sch.pdf" rel="noreferrer">schematic</a> helps.</p>
<p>Also, as StarCat mentioned, you need two <code>delay()</code>s to make an LED blink.</p>
