# Part 1: Update Firmware on Raspberry Pi Pico W
###### tags: `TA Stuff RP2` `Raspberry Pi Pico`
In this tutorial, we walk you through the hardware configuration, so you are up and running for your journey in IoT. If you own a **Raspberry Pi Pico W** or the newer version named **Raspberry Pi Pico 2 W** you should follow this tutorial.
#### Table of Devices
| Model | Image | Alternate Names | Pinout Diagram |
|-------|-------|-----------------|-------------|
| [Raspberry Pi Pico W (RP2040)](https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#picow-technical-specification)|  | RP2, RP2040 | [PicoW-A4-Pinout.pdf](https://datasheets.raspberrypi.com/picow/PicoW-A4-Pinout.pdf) |
| [Raspberry Pi Pico 2 W (RP2350)](https://www.raspberrypi.com/documentation/microcontrollers/pico-series.html#pico2w-technical-specification) |  | RP2, RP2350 | [pico-2-w-pinout.pdf](https://datasheets.raspberrypi.com/picow/pico-2-w-pinout.pdf) |
In this walkthrough you will:
* Download and update the board micropython firmware
* Try some test code to confirm everything is set properly
## 0. Prerequisites
<!---You have watched this brief walkthrough, at least to the firmware update part: <span style="color:red">[**Session 2 Setup Atom Pymakr**](Link To YouTube Tutorial for Heltec basic installation if we have one.) and:</span> -->
* You should be finished with the [IDE installation](https://hackmd.io/@lnu-iot/rkiTJj8O9) tutorial before proceeding with this tutorial.
* Have your Raspberry Pi Pico board ready
* USB Cable
:::info
**Make sure the USB cable has four pins and is capable of data transferring. If you get the bundle with cable it will be supported**
:::
## 1. Firmware update
Follow these steps:
+ **Step 1:** Remove the ESD sponge from the Pico before proceeding. (The black sponge attached under your pico).
:::warning
Be sure to download the correct firmware for your board, identify your board from above images, then select the matching link below.
:::
+ **Step 2:** Download the micropython firmware using the link for your specific board. You will receive a **uf2** file.
- If you have a Raspberry Pi Pico W / RP2040 - download [**this file**](https://micropython.org/resources/firmware/RPI_PICO_W-20250415-v1.25.0.uf2).
- If you have a Raspberry Pi Pico 2 W / RP2350 - download [**this file**](https://micropython.org/resources/firmware/RPI_PICO2_W-20250415-v1.25.0.uf2).
+ **Step 3:** Connect the **micro-usb** end of your cable (the small side) into the Raspberry Pi Pico, be sure to firmly hold the back of the USB slot so that by pushing you will not bend it. The USB won't have to be entered fully, it's normal that a small gap will be left out from the slot.
+ **Step 4:** While holding the **BOOTSEL** key down on the board, connect the **USB type A** end of your cable (the big side) into your computer's USB port. If you want to be extra safe avoid using a USB hub and prefer the ports on your desktop/laptop computer. You can release the **BOOTSEL** after connecting it to your computer.
+ **Step 5:** You will see a new drive open in your file system named **RPI-RP2** which is the Raspbbery Pi Pico storage. You can copy/paste the **uf2** in this storage.
+ **Step 6:** Wait until your board automatically disconnects from your computer (new drives disappear).
+ **Step 7:** To confirm the board is ready, please unplug and plug back the USB cable.
:::danger
**Do not disconnect the device from your computer during firmware installation. It may cause firmware damages and you will have to redo the above steps.**
:::
## Extra Step
:::info
You will have to do this step exclusively if you are currently operating on a Linux machine. If you are using Windows or MacOS please proceed to the next step now, ignoring this one.
:::
+ If you are on a [Debian](https://distrowatch.com/search.php?basedon=Debian&status=Active#distrosearch)/[Fedora](https://distrowatch.com/search.php?basedon=Fedora&status=Active#distrosearch) based operating system enter this command into your favorite terminal emulator:
```bash=
sudo usermod -a -G dialout $USER
```
+ If you are on an [Arch](https://distrowatch.com/search.php?basedon=Arch&status=Active#distrosearch) based operating system enter this command into your favorite terminal emulator:
```bash=
sudo usermod -a -G uucp $USER
```
<br>
:::danger
You will need to **reboot** your machine before you can continue with the next steps.
:::
## 2. Testing the board
:::success
**Be sure you have properly installed an IDE before proceeding on this step, following [this guide](https://hackmd.io/@lnu-iot/rkiTJj8O9) if you want to use VSCode and [this guide](https://hackmd.io/@lnu-iot/SyTPrHwh_) if you want to use Thonny instead.**
:::
### Thonny
* **Step 1:** Input the following string in the shell after the ```>>>``` symbols
```python=
print("Good luck with your studies, from LNU!")
```
+ **Step 2:** You should have the same text responded back to you from the connected board like in the picture below:

### Visual Studio Code
* **Step 1:** Open up VSCode and open the Pymakr extension in the left bar

* **Step 2:** Plug in your Raspberry Pico (2) W while taking a look at the list of **devices**. The new device that pops up will be the Pico.

* **Step 3:** Hover your mouse over the device and press the lightning button to connect the Pico.

* **Step 4:** After the board is connected, hover over the device again and now press the terminal button to upen up a terminal.

* **Step 5:** Input the following string in the shell after the ```>>>``` symbols
```python=
print("Good luck with your studies, from LNU!")
```
* **Step 6:** You should have the same text responded back to you from the connected board like in the picture below:

:::success
You are now successfully finished Part 2 of four part tutorial, It is a good idea to read more about MicroPython **Tutorials and Examples** from [**Raspberry Pi Documentation (here)**](https://www.raspberrypi.com/documentation/microcontrollers/micropython.html) and try different code to learn more.
Good Luck!
:::
## 3. Troubleshooting
:::danger
Be sure to have a copy of your project saved on your computer before proceeding!
:::
:::warning
**Follow this part if your device is stuck and there is no other way to recover it.**
According to the Raspberry Pi team there is no way to brick this board through software alone, that's because no matter what you will always be able to reset it back by following the procedure described before. In case you think your board is stuck please follow the procedure for firmware update linked below, but instead of the usual firmware from before, you should use [**this one**](https://datasheets.raspberrypi.com/soft/flash_nuke.uf2) instead. This will ensure that the memory will be completely erased.
After this, you may proceed from [step 1](#1-Firmware-update) to flash the firmware again.
:::
:::success
You are now ready to move to the next tutorial [**(here)**](https://hackmd.io/@lnu-iot/B1T1_KM83) to get familiar with terms and project structure.
:::
## 4. Feedback
We'll continuously update this walkthrough. **Is there anything that needs to be clarified, or have you experienced some issues? Please add a comment.** You do this by highlighting the text and then you can write a comment on the highlighted part. You need to log in/create an account on HackMD first.