Single-color LED
The official Raspberry Pi Pico board has a built-in single-color LED that can only be turned on or off. You can control the LED with the led command in pico-jxglib's shell.
Control the LED
To turn the LED on and off:
Use the flip subcommand to toggle the LED at specified intervals. The following example blinks the LED every 100ms:
The flip subcommand blinks the LED eternally in the background, so you can run other commands while the LED blinks. To stop the blinking, use the led off command:
The following example blinks the LED for 50ms, off for 500ms, three times, then off for 2000ms, and repeats:
To stop flipping after a certain number of times, add * at the end. The following blinks three times, then turns off: