VS Code won't upload to Arduino Uno R4 Wifi

Hi,

I have a bizarre problem. I have set up Visual Studio Code (with the official Microsoft produced Arduino extension) to work with both my Arduino Uno R4 Minima and my Arduino Uno R4 Wifi. I have absolutely no problems whatsoever with the R4 Minima, but I cannot get VS Code to successfully upload to the R4 Wifi. Typically the R4 Wifi will be on COM7.

[Starting] Uploading sketch 'GameOfLife.ino'
[Warning] Output path is not specified. Unable to reuse previously compiled files. Build will be slower. See README.
Sketch uses 54640 bytes (20%) of program storage space. Maximum is 262144 bytes.
Global variables use 7408 bytes (22%) of dynamic memory, leaving 25360 bytes for local variables. Maximum is 32768 bytes.
No device found on COM7
Error during Upload: Failed uploading: uploading error: exit status 1
IntelliSense configuration already up to date. To manually rebuild your IntelliSense configuration run "Ctrl+Alt+I"
[Error] Uploading sketch 'GameOfLife.ino': Exit with code=1

If I swap out the R4 Wifi (on COM7) for the R4 Minima (on COM4) - things work as they should, so it's not a hardware/cable/usb port problem...

Any ideas?

1 Like

I am having the same problem. VS Code works fine with Uno R3, Mega etc, but not with Uno R4 Wifi Makes me think the problem is with how VS Code communicates with the R4 board. I get around it by using the Arduino IDE, but would prefer to use VS Code.

Anyone found a solution to this?

I'm also having the same problem using VS Code Arduino extension v0.6.0 and an Arduino Uno R4 Wifi. Uploading works fine using the Arduino IDE and SerialPort COM10, but when using the VS Code extension it throws first a warning:

No device found on COM10

and then an error

[Error] Uploading sketch 'Blink.ino': Exit with code=1

My current workaround is to use the VS Code Extension PlatformIO IDE, which works fine with the Uno R4 Wifi.

Bump!

I have wanted to program the R4 wifi with VS code for a year now.
Can someone please look into this?

Looks like Microsoft are aware of the problem with their code;

https://github.com/microsoft/vscode-arduino/issues/1706

This is an Arduino forum :wink: So in this case anything that is not Arduino IDE related (platformio, vscode, ...) will not be solved by the Arduino company.

Some people here indeed use alternatives to the Arduino IDE and might be able to help. But in general you will be better off informing the authors of those alternatives if you encounter the issues mentionrd here.