IDE 2.2.1 Windows 11 RPi Pico W - nothing uploads, nothing runs

The IDE updated to 2.2.1 fine, and I can select the Raspberry Pi Pico W board as Arduino Mbed OS RP2040 Boards Raspberry Pi Pico

When I follow the usual instructions to press bootsel whilst pluggin in the Pico W, I see a drive on the Windows computer but running the Arduino IDE cannot find the Port for the Pico W.

When I unplug and replug the Pico W, the IDE finds the port and I can compile and upload programs like Blink.

The programs say they are uploaded (Loading into Flash: [==============================] 100%

But then nothing else happens

According to Programming Raspberry Pi Pico with Arduino IDE | Random Nerd Tutorials and How to Program Raspberry Pi Pico With the Arduino IDE | Tom's Hardware the code

This is happening with an absolutely new Pico W - nothing like MicroPython has been loaded.

The output goes loaded into flash but I am missing the sketch uses xx space

So I then load the Raspberry PI Micropython OS (bootsel, plugin, copy v1.21.0.uf2 to the Pico W and let it reboot.

When I now try to upload the sketch I get a different error, which looks promising but then errors out on the upload

Sketch uses 89905 bytes (4%) of program storage space. Maximum is 2097152 bytes. Global variables use 42836 bytes (15%) of dynamic memory, leaving 227500 bytes for local variables. Maximum is 270336 bytes. Performing 1200-bps touch reset on serial port COM10 "C:\Users\brian\AppData\Local\Arduino15\packages\arduino\tools\rp2040tools\1.0.6/rp2040load" -v -D "C:\Users\brian\AppData\Local\Temp\arduino\sketches\EC31F9D29F32E1B81539FC5AFAFC9C8D/sketch_oct24a.ino.elf" rp2040load 1.0.6 - compiled with go1.16.2 ..................... Failed uploading: uploading error: exit status 1

Rebooting with bootsel reverts to the "USB File mode" and IDE does not recognise the Pico Port

Rebooting without bootsel boots the Pico W into a mode where it goes back to "Loading into Flash;" but not getting the Sketch uses... part of the upload.

I went through the drivers as found here Raspberry Pi Pico, Can't Load any Sketch - #9 by Papirrruqui and nuked and reset everything.

It seem that if I don't load micropython.uf2 the Pico W sits in folder mode and the IDE does not see it.

If I load the Pico W .uf2 I can select the board, the port (com10) and Board info looks good except it says "Unknown board"

If I load the Pico (not Pico W) micropython .uf2 I have the same issue except the board is recognised.

Is there a working .uf2 that I need to install to support Arduino IDE?

I tried circuit python 8.2.7 and the upload sequence appears to work, but the code never runs.

Hi @brianlmerritt

Please provide the full sketch code you uploaded to the board in a reply here on this forum topic.

Please provide a detailed description of what you expected to happen after uploading that code to the board.

First tried this VX53L5CX code

  Read an 8x8 array of distances from the VL53L5CX
  By: Nathan Seidle
  SparkFun Electronics
  Date: October 26, 2021
  License: MIT. See license file for more information but you can
  basically do whatever you want with this code.

  This example shows how to read all 64 distance readings at once.

  Feel like supporting our work? Buy a board from SparkFun!
  https://www.sparkfun.com/products/18642

*/

#include <Wire.h>

#include <SparkFun_VL53L5CX_Library.h> //http://librarymanager/All#SparkFun_VL53L5CX

SparkFun_VL53L5CX myImager;
VL53L5CX_ResultsData measurementData; // Result data class structure, 1356 byes of RAM

int imageResolution = 0; //Used to pretty print output
int imageWidth = 0; //Used to pretty print output

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("SparkFun VL53L5CX Imager Example");

  Wire.begin(); //This resets to 100kHz I2C
  Wire.setClock(400000); //Sensor has max I2C freq of 400kHz 
  
  Serial.println("Initializing sensor board. This can take up to 10s. Please wait.");
  if (myImager.begin() == false)
  {
    Serial.println(F("Sensor not found - check your wiring. Freezing"));
    while (1) ;
  }
  
  myImager.setResolution(8*8); //Enable all 64 pads
  
  imageResolution = myImager.getResolution(); //Query sensor for current resolution - either 4x4 or 8x8
  imageWidth = sqrt(imageResolution); //Calculate printing width

  myImager.startRanging();
}

void loop() {
  //Poll sensor for new data
  if (myImager.isDataReady() == true)
  {
    if (myImager.getRangingData(&measurementData)) //Read distance data into array
    {
      //The ST library returns the data transposed from zone mapping shown in datasheet
      //Pretty-print data with increasing y, decreasing x to reflect reality
      for (int y = 0 ; y <= imageWidth * (imageWidth - 1) ; y += imageWidth)
      {
        for (int x = imageWidth - 1 ; x >= 0 ; x--)
        {
          Serial.print("\t");
          Serial.print(measurementData.distance_mm[x + y]);
        }
        Serial.println();
      }
      Serial.println();
    }
  }

  delay(5000); //Small delay between polling
}

Then blink

  Blink

  Turns an LED on for one second, then off for one second, repeatedly.

  Most Arduinos have an on-board LED you can control. On the UNO, MEGA and ZERO
  it is attached to digital pin 13, on MKR1000 on pin 6. LED_BUILTIN is set to
  the correct LED pin independent of which board is used.
  If you want to know what pin the on-board LED is connected to on your Arduino
  model, check the Technical Specs of your board at:
  https://www.arduino.cc/en/Main/Products

  modified 8 May 2014
  by Scott Fitzgerald
  modified 2 Sep 2016
  by Arturo Guadalupi
  modified 8 Sep 2016
  by Colby Newman

  This example code is in the public domain.

  https://www.arduino.cc/en/Tutorial/BuiltInExamples/Blink
*/

// the setup function runs once when you press reset or power the board
void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);  // turn the LED on (HIGH is the voltage level)
  delay(1000);                      // wait for a second
  digitalWrite(LED_BUILTIN, LOW);   // turn the LED off by making the voltage LOW
  delay(1000);                      // wait for a second
}

OK, great. The "Arduino Mbed OS RP2040 Boards" platform doesn't have support for your Raspberry Pi Pico W board (it only supports the non-W Pico board). Your use of an unsupported board is the reason for the "nothing else happens" result you observed.

For the Pico W, you should use the excellent 3rd party "Raspberry Pi Pico/RP2040" boards platform from Earle F. Philhower, III. You can find installation instructions here:

https://arduino-pico.readthedocs.io/en/latest/install.html#installing-via-arduino-boards-manager

After completing the installation, select Tools > Board > Raspberry Pi Pico/RP2040 > Raspberry Pi Pico W from the Arduino IDE menus and then upload the "Blink" sketch to the board again. I think this time you will see the LED on the board blinking merrily as expected.

1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.