# Platformio and Pico W - cannot upload

**URL:** <https://forums.pimoroni.com/t/platformio-and-pico-w-cannot-upload/20775>\
**Category:** Support\
**Created:** [November 22, 2022, 4:15pm UTC](https://forums.pimoroni.com/t/platformio-and-pico-w-cannot-upload/20775 "2022-11-22T16:15:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gen](https://avatars.discourse-cdn.com/v4/letter/g/3da27b/32.png) [@Gen](https://forums.pimoroni.com/u/Gen)\
**Post date:** [November 22, 2022, 4:15pm UTC](https://forums.pimoroni.com/t/platformio-and-pico-w-cannot-upload/20775/1 "2022-11-22T16:15:49Z")

</div>

I installed the firmware and got the built in LED flashing using Thonny, so I know that the Pico W works.

But I can’t get even a “Hello World” program running using VS Code and Platformio. It fails to upload with error 1.

Can anyone give a link to a good tutorial to get Code, Platformio and Pico W working? Writing the code isn’t a problem, the setup seems to be

---

<div class="post-metadata">

**Author:** ![bablokb](https://avatars.discourse-cdn.com/v4/letter/b/ee59a6/32.png) [@bablokb](https://forums.pimoroni.com/u/bablokb)\
**Post date:** [November 22, 2022, 8:35pm UTC](https://forums.pimoroni.com/t/platformio-and-pico-w-cannot-upload/20775/2 "2022-11-22T20:35:42Z")

</div>

I am not using Platformio for this, but VSC native. I use a tasks.json in my project like this:

```auto
{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  "version": "2.0.0",
  "tasks": [
     {
         "label": "Copy to Pico",
         "type": "process",
         "problemMatcher": [],
         "options": {
             "cwd": "${workspaceFolder}"
         },
         "command": "openocd",
         "args": [
             "-f",
             "interface/raspberrypi-swd.cfg",
             "-f",
             "target/rp2040.cfg",
             "-c",
             "program ${command:cmake.launchTargetPath} verify reset exit"
         ],
         "group": "none",
         "presentation": {
             "echo": true,
             "reveal": "always",
             "focus": false,
             "panel": "shared",
             "showReuseMessage": false,
             "clear": false
         },
     }
 ]
}

```

---

<div class="post-metadata">

**Author:** ![Gen](https://avatars.discourse-cdn.com/v4/letter/g/3da27b/32.png) [@Gen](https://forums.pimoroni.com/u/Gen)\
**Post date:** [November 23, 2022, 5:34pm UTC](https://forums.pimoroni.com/t/platformio-and-pico-w-cannot-upload/20775/3 "2022-11-23T17:34:26Z")

</div>

Thanks for your suggestion. I have used platformio in the past and found the environment quite helpful. Although I may change my mind in the future, I’ll be sticking with it for now…

For anybody else with this issue of not finding the device to upload to on Ubuntu. It seems that I had a problem that a previous installation of platformio was being picked up. Which gave some unpredictable results (unsurprisingly).

In a treminal I ran  
pio device list  
And got no results (despite the pico w being plugged in)

I then did  
pip install -U platformio  
(get a wall of friendly and happy status messages)

And I now get  
pio device list  
Please wait while upgrading PlatformIO…  
PlatformIO has been successfully upgraded to 6.1.6a3!

## /dev/ttyACM0

Hardware ID: USB VID:PID=2E8A:00C0 SER=xxxxxxxxxxxxxxxx LOCATION=3-2:1.0  
Description: RaspberryPi Pico

And I can now upload my code.
