Skip to content

Latest commit

 

History

History

pico-blink

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

pico-blink

Requirements

  • A Raspberry Pi Pico (non-W) board. If you have a Pico W instead, this sample code will require modifications.

How to build and run this example:

  • Connect the Pico board via a USB cable to your Mac, and make sure it's in the USB Mass Storage firmware upload mode (either hold the BOOTSEL button while plugging the board, or make sure your Flash memory doesn't contain any valid firmware).
  • Make sure you have a recent nightly Swift toolchain that has Embedded Swift support.
  • Build and copy the program in the UF2 format to the Mass Storage device to trigger flashing the program into memory (after which the device will reboot and run the firmware):
$ cd pico-blink
$ TOOLCHAINS='<toolchain-identifier>' ./build.sh
$ cp .build/blink.uf2 /Volumes/RP2040
  • The green LED should now be blinking in a pattern.