Demos are divided into two categories:
- Those that can be compiled for/run on both RP2040 (Pico 1) and RP2350 (Pico 2) with no code changes
- Those that are ONLY for a specific chip, RP2040 or RP2350 due to a unique feature present on one but not the other
- Note that since the wireless boards (Pico 1 W and Pico 2 W) require the LED to be driven in a slightly different manner, these are included in a separate section alongside some wireless specific tests
Currently many demos are marked as "RP2040 only" simply because HAL functionality hasn't been ported to the RP2350 given it's a very new chip. Most examples will eventually be able to run on either chip with no changes due to their peripherals being extremely similar. All demos that run on the the Pico board can also be run on the RP2040-Plus without modification.
- blinky on the Pico or Pico2 boards
Blinks the LED on the board. For the Pico W or Pico2 W see the CYW43 section below. - changing system clocks on the Pico or Pico2 boards
Shows an example of changing SYS and REF clock frequencies. - custom clock config on the Pico or Pico2 boards
Shows an example of a fully custom clock configuration. - gpio clock output on the Pico or Pico2 boards
Routes the SYS clock divided by 1000 out to GPIO25. - watchdog timer on the Pico or Pico2 boards
Enables a watchdog timer for 1 second, and demonstrates the chip resetting when the watchdog timer elapses - usb device on the Pico or Pico2 boards
A really basic example for a raw USB device. You can use the Python 3 scriptscripts/usb_device_loopback.pyto test the USB device.
- adc on the Pico board
This example takes periodic samples of the temperature sensor and prints it to the UART using the stdlib logging facility. - blinky core1 on the Pico board
Blinks the LED on the board using the second CPU. - flash program on the Pico board
Writes and reads data into the flash. - i2c bus scan on the Pico board
Prints all I²C devices on UART0 (Pin 0,1) attached to I²C on SCL=GPIO4, SDA=GPIO5. - pwm on the Pico board
Slowly blinks the LED on the Pico with a smooth blinking using PWM. - random on the Pico board
Showcases how to use the internal random generator. - spi host on the Pico board
Showcases how to use the SPI host controller. - squarewave on the Pico board
Showcases how to use the PIO to emit a basic square wave. - uart on the Pico board
Showcases how to use the UART together withstd.log. - usb hid on the Pico board
A really basic example how to implement a USB HID device. You can use the Python 3 scriptscripts/hid_test.pyto test the HID device. - ws2812 on the Pico board
Showcases how to control one WS2812 LED attached to GPIO23. - tiles on the RP2040-Matrix board
Showcases how to control the LED matrix on the development board to do a simple color flipper effect.
None for now! But an HSTX or other new feature example could go here in the future.
You can flash all examples using either your file browser by dragging the example .uf2 file from zig-out/firmware/ to the directory.
Or you can use picotool to flash a uf2 file:
[user@host] raspberrypi-rp2040/ $ picotool load -x zig-out/firmware/${file}.uf2
Loading into Flash: [==============================] 100%
The device was rebooted to start the application.
[user@host] raspberrypi-rp2040/ $