- RP2040 microcontroller chip designed by Raspberry Pi in the United Kingdom
- Dual-core Arm Cortex M0+ processor, flexible clock running up to 133 MHz
- 264kB of SRAM, and 2MB of on-board flash memory
- USB 1.1 with device and host support
- Low-power sleep and dormant modes
- Drag-and-drop programming using mass storage over USB
- 26 × multi-function GPIO pins
- 2 × SPI, 2 × I2C, 2 × UART, 3 × 12-bit ADC, 16 × controllable PWM channels
- Accurate clock and timer on-chip
- Temperature sensor
- Accelerated floating-point libraries on-chip
- 8 × Programmable I/O (PIO) state machines for custom peripheral support
- On-board single-band 2.4GHz wireless interfaces (802.11n) using the Infineon CYW43439
Interactive Raspberry Pi Pico Pinout: https://pico.pinout.xyz/
- Download the MicroPython firmware for Raspberry Pi Pico W (link: https://micropython.org/download/rp2-pico-w/rp2-pico-w-latest.uf2).
- Push and hold the BOOTSEL button and plug your Pico W into the USB port of your computer. Release the BOOTSEL button after your Pico W is connected. It will mount as a Mass Storage Device called RPI-RP2.
- Drag and drop (or copy and paste) the MicroPython UF2 file onto the RPI-RP2 volume. Your Pico W will reboot. It is now running MicroPython.
- Install Thonny IDE (link: https://thonny.org/).
- Once Thonny is installed, open it. If Pico W is still plugged in into the computer, you should see on the lower right corner of the Thonny IDE that the Pico W is detected. Also, you would see that the Thonny shell is active and it says which MicroPython version is installed in your Pico W.
- To test if the MicroPython is really detected, type the command
print("Hello world!")
in the Thonny shell then press enter. If the text is printed after you've entered the command, it means that you have successfully installed MicroPython to Raspberry Pi Pico W. Congratulations! You can now program your Pico W!
- Open a script that you wanted Raspberry Pi Pico W to run (for instance, you may open the standard blink.py).
- To run a script, click the green play button in the toolbar on top. You should see a notification in the Thonny shell below that the script is running and (if you have used the Blink program) you should see the onboard LED of the Raspberry Pi Pico W blinking.
- To stop the script, click the red stop button in the toolbar on top.
Once a script is run by the board, it doesn't automatically mean that it would run by default when power is given to the board. This is in contrast with downloading a sketch in an Arduino board where the sketch would automatically run when the Arduino board is given power (via the DC jack) disconnected from the computer. To enable the board to run a script by default when power is given to it, the script must be saved to the Raspberry Pi Pico W itself. The steps are as follows:
- If a script is running, stop the script.
- Click "File" on the upper left corner of the Menu Bar of the Thonny IDE then click "Save as."
- A new window would appear asking where the script must be saved. Choose "Raspberry Pi Pico."
- Afterwards, a new window would appear allowing you to type the file name for the script. Type main.py as the file name (this is the required file name to enable the Pico W to automatically run the script). Press OK. (Additional note: There is a "lib" folder when you save the script to Raspberry Pi Pico W. This is just the folder where the modules, installed in Pico W, would be located.)
- To verify that the script is already saved (as main.py) in Pico W, the file name displayed on the script tab above the actual script would change to
[main.py]
(emphasis on the square brackets). Also, if you enable the "Files" view to see the files (to be displayed as a sidebar to the left) in both the computer and Raspberry Pi Pico, you would see the file "main.py." (Note: To enable "Files" view, click "View" in the Menu Bar on top then click "Files.")
- As a final verification, disconnect the Pico W from your computer then plug it again. At the instance that power is applied to the board, Pico W will run the saved script. If the standard blink.py is saved as main.py, you would that the onboard LED of the Pico W blinking every second. Congratulations! You now know how to save a script to the Pico W!
To install modules to the Raspberry Pi Pico W, first make sure that the board is plugged in to your computer. Then, you may follow any of the steps below.
- Click on Tools in the Menu Bar on top of the Thonny IDE then click "Manage Packages." A window would then appear showing the instructions how to install a module.
- In the search bar, type picozero then press enter or click "Search on PyPI."
- The module name that you have typed will appear in the selection. Click picozero. It would show the details of the module that you have selected. Once you have verified that it's the module that you wanted to install, click "Install" on the lower part of the window.
- A progress window would then appear showing the status of the installation. After installation, the progress window would disappear and you would see picozero in the left sidebar of the package manager window which shows the modules already installed. Furthermore, when picozero is selected, there are two options that will appear on the lower part of the window - "Upgrade" and "Uninstall" - rather than just "Install." This is another indication that picozero is already installed in Pico W.
- As a last verification that picozero is already installed, show the files that are contained in Pico W (see Step 5 above to know how to enable the "Files" view) and you would see that inside the "lib" folder, there are picozero folders saved. Congratulations! You can now use the picozero module in your Pico W. (Note: Should you wish to install other modules, you can follow the same process.)
- Look for the actual Python code of the module that you wanted to save in Pico W. For picozero, the code can be found here: https://raw.githubusercontent.com/RaspberryPiFoundation/picozero/master/picozero/picozero.py?token=GHSAT0AAAAAABRLTKWZDBSYBE54NJ7AIZ6MYSENI2A
- Copy and paste the entire code as a new file in Thonny.
- Save the file to Raspberry Pi Pico. Go inside the "lib" folder, and in there, save the file as "picozero.py."
- As a verification, you would see, when the "Files" view is enabled, that "picozero.py" is saved under the lib folder.
- As a final verification, open blink_picozero.py then run it. You should see that the onboard LED of Pico W blinking. (Note: Should you wish to install other modules not available via the Thonny Package Manager, you can follow the same process, outlined here, to install the necessary module/s.)
- The first method (via the Thonny Package Manager) is the most convenient; however, if the modules you're looking for aren't available in the package manager, then you can't use this method.
- The second method (manual saving) is more flexible but is more tedious. You should use this method only if the modules that you wanted to install aren't available in the Thonny Package Manager (such as some LCD modules).
- Raspberry Pi Pico/Pico W Documentation: https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html
- MicroPython Documentation: https://docs.micropython.org/en/latest/index.html
- picozero Documentation: https://picozero.readthedocs.io/en/latest/index.html
- Arduino Labs for MicroPython (should you wish to use "Arduino" for MicroPython): https://labs.arduino.cc/en/labs/micropython
- Each directory contains MicroPython programs, README files (containing circuit diagrams, Wokwi simulation links, and other notes), Fritzing files, and/or steps to implement the project/program contained within the folder.
- Each directory is themed according to the device interfaced with the Raspberry Pi Pico W or on an overarching project theme. To specify, the directories are described as follows:
- Analog IO - contains files related to the use of analog components, such as the potentiometer (analog input) and using PWM to control LED brightness (analog output)
- Blink - contains files related to the use of LEDs (and the programs contained in the directory would just make the LEDs simply turn on or off)
- Buzzer - contains files related to the use of active and passive buzzers
- DHT - contains files related to the use of DHT11/22 Sensor
- LCD I2C - contains files related to the use of an LCD screen with I2C adaptor
- LDR - contains files related to the use of a photoresistor/LDR
- Liquid Level Sensor - contains files related to the use of an HW-038 Water/Liquid Level Sensor
- PIR - contains files related to the use of a HC-SR501 Passive Infrared (thus, PIR) Sensor
- Push Button - contains files related to the use of push buttons
- Servo Motor - contains files related to the use of servo motors
- Ultrasonic Distance Sensor - contains files related to the use of an HC-SR04 Ultrasonic Distance Sensor
- Web - contains several directories containing files interfacing Raspberry Pi Pico W to the web (additional details are contained in the README file of that directory)
- Programs would work for both Raspberry Pi Pico and Pico W, except for programs blinking the onboard LED which is accessed differently for Pico and Pico W if purely using the machine library (check comments on blink.py) and for web-related projects which are obviously only for Pico W (having a WiFi module).
- Only Raspberry Pi Pico is used in Wokwi simulations since Pico W is not yet available in Wokwi. Should it become available in Wokwi, simulations would be updated to use Raspberry Pi Pico W.
- Contents of this repository would definitely be updated as more devices are interfaced and verified to work with the Raspberry Pi Pico W.
- Disregard the images (detailing the steps to get started with Pico W) uploaded in the main directory. They are only uploaded to be used for this README file.
- Pi Pico SDK 1.5.0 Release Adds Bluetooth Support
- Vlad Tomoiagă's FakePGA Turns a Raspberry Pi Pico or Other RP2040 Board Into a Slow, Cheap "FPGA"
- The Raspberry Pi Pico Installer Is a One-Shot Way to Set Up an RP2040 Toolchain on Windows
- Did I close the garage door? Let Raspberry Pi check for you
- Raspberry Pi Pico Projects for Schools
- Adafruit's PiCowbell Adalogger Turns a Raspberry Pi Pico or Pico W Into a Compact Datalogger
- Theremin-like Pico H musical instrument
- Capacitive Touch Input With the Raspberry Pi RP2040 Pico
- ScottoErgo: ergonomic hand-wired keyboard
- MicroPython 1.20.0 Launches with Mip, a Dedicated Package Manager, and Raspberry Pi Pico W Support
- Philip Howard's Raspberry Pi Pico GPIO Pinout Python Program Prints Pins at Your Terminal
- Deep Learning at (Small) Scale: How to run PilotNet on a Raspberry Pi Pico microcontroller
- Getting Started with the Raspberry Pi Pico Multicore Microcontroller Board Using C
- Milk-V Unveils Its Third RISC-V Board in a Month: The $9 Dual-Core Linux-Capable Milk-V Duo [Raspberry Pi Pico-inspired]
- New functionality: Bluetooth for Pico W
- Raspberry Pi Gives the Pico W a Bluetooth Boost, Classic and BLE Modes Now Available in MicroPython
- Generating Text with ChatGPT, Pico W, & CircuitPython
- Open Source Experiential Robotics Platform (XRP) Kit Now Available for Pre-Order
- Gary Sims' PiccoloBASIC Is a Minimalist Programming Language for the Raspberry Pi Pico, RP2040
- GPS pothole tracker
- Set sail in the Pico-powered ‘Roboat’
- Set Sail with the Raspberry Pi Pico W
- Autoflash multiple Raspberry Pi Picos in no time at all
- Mark Stevens' PicoDebugger Aims to Make PicoProbe Debugging Tidier, Neater, and More Flexible
- Pico-powered chess robot plays dirty using ChatGPT
- Phil Barrett's PicoCNC Aims to Provide Professional Laser, Lathe, and Router Control at a Low Cost
- How I made the PicoCray | HackSpace #69
- Rishin Goswami's PicoSigGen Aims to Turn a Raspberry Pi Pico Into a 100MS/s Waveform Generator
- Dmitry Grinberg's ROMRAM Adds 8MB of External RAM to the Humble Raspberry Pi RP2040
- Getting to grips with Bluetooth on Pico W
- Buckle Up for Adventure
- Track your run to the Moon with a Raspberry Pi-powered ladder
- Pico QwiicReset Prototyping Assistant
- This Pico-powered belt pulls you north
- A 1970S MASK ROM MCU SPILLS ITS SECRETS
- André Costa's Pico W Air Is a Raspberry Pi Pico W Carrier Board for Air Quality Monitoring
- Tim Hanewich's Scout Flight Controller Pushes MicroPython on the Raspberry Pi Pico to the Limit
- Handheld Linux Terminal [HaLiTerm]
- Synthesize music with animations on a Raspberry Pi Pico
- Michael Wessel's Raspberry Pi Pico-Powered 6116 SRAM Emulator Gives Vintage SBCs a Major Overhaul
- Kamina Keyboard
- SAVING PIC MICROCONTROLLERS WITH DIY PROGRAMMER
- Quick and dirty PIC16F72 programmer with the Pico
- Wirelessly Controlling the Pico ARP with the Mini Controller for Pico
- Dual Spiral Marble Clock
- A big bang update for TensorFlow Lite for Microcontrollers
- PicoPD - USB-C PD 3.0 PPS Trigger with RP2040
- RASPBERRY PI PICO PARALLEL MANDELBROT COMPUTATION
- David Slik's Asynchronous Array of Raspberry Pi Picos, AARPP, Is a Tile-Based RP2040 Supercomputer
- Microsoft's Bitlocker & TPM encryption combo defeated with a $10 Raspberry Pi and a bit of braininess
- Thomas Roth Breaks Microsoft's BitLocker in Under a Minute — with a $4 Raspberry Pi Pico
- Adafruit announces the latest CircuitPython release for Raspberry Pi Pico and other microcontrollers
- MicroPython Plans a New Feature for the Raspberry Pi RP2040: Runtime-Defined USB Device Support
- Some Smart Thinking About Always-On Wi-Fi Gets a Raspberry Pi Pico W Weather Station Sipping Solar
- Michael P. Turns to a Raspberry Pi Pico to Reverse Engineer These Classic Plessey Micro-LED Displays
- Handwritten digit classification using Raspberry Pi Pico and Machine Learning
- Raspberry Pi Pico Web Server using MicoPython & ESP8266
- TinyML Implementation using Raspberry Pi Pico: Geometry Gesture Detection (Part-I)
- TinyML Implementation using Raspberry Pi Pico: Geometry Gesture Detection (Part-II)
- Performing Linear Regression in MicroPython-Raspberry Pi Pico (RP-2040)
- Logistic Regression on Raspberry Pi Pico using MicroPython
- Neural Network Implementation in MicroPython for TinyML
- Raspberry Pi Pico Sensor Data Display on Webpage using Serial Port
- Hand Gesture Recognition for Numbers using TinyML
- Jan Dvořák's Software-Defined Radio Is Built From a Raspberry Pi Pico — And Very Little Else
- PiWings Is a Raspberry Pi Pico-Based Flight Controller for Drones