7a Help getting started with project
2 minute read
1. Install firmware
- Plug in your Pico.
- If it appears as a USB drive called:
RPI-RP2
, continue to step 3.CIRCUITPY
, skip to step 5.
- Download the CircuitPython firmware and copy the file onto the
RPI-RP2
drive. - The Pico will automatically disconnect and reappear as a USB drive called CIRCUITPY.
2. Add library file
- Download the neopixel library and copy it into the
lib
folder on the CIRCUITPY drive.
3. Open file and test code
- Open Mu Editor.
- Choose
Load
, and find the CIRCUITPY drive. Open the file calledcode.py
. This is the program file the Pico is executing. - Find the example programs on the website.
- Copy the code from the Flash a light example into the code.py file, replacing whatever is already there.
- Save the file. The Pico will restart and run the new code automatically.
- Check that the program is running correctly. In this case, the built-in green light next to the USB port should flash.
- Change the sleep timings to adjust the flash pattern. Can you write your initials in morse code?
4. Solder components
- Watch the soldering tutorial.
- Disconnect the USB cable from your Pico.
- Solder the components onto your Pico, making absolutely sure that you follow the wiring diagram and connect the correct pins to each other. Use the colour coding on the wires to check which pin on the strip is connected to which pin on the board.
5. Check your NeoPixel strip
- Find the Use NeoPixel strip example code on the website.
- Copy the code from the example into the code.py file, replacing whatever is already there, and save it.
- Check that the program is running correctly. In this case, the NeoPixels should light up variously in red, green, blue and white.
- If this doesn’t happen check that:
- you have wired the strip correctly
- you have added the neopixel library to the lib folder
- the library file is called
neopixel.mpy
and not, for exampleneopixel (1).mpy
.