WiFi Rev 2 not uploading: [SOLVED]

Hello there.
I am using Arduino WiFi rev2, the Arduino IDE, and Windows 10 computer.
I was getting this error while uploading my robot code:

avrdude: jtag3_edbg_send(): failed to send command to serial port
avrdude: failed to write 64 bytes to USB port

This would loop until the IDE crashed, and this was happening every time I tried to upload the code. I figured out what was wrong, so I won't post the code. The general gist of the code was: Connect to WiFi and Blynk servers, when data is received (Blynk Bridge widget), move accordingly.
I fixed this error by uploading a Blink (not Blynk) sketch:

/*
  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.

  http://www.arduino.cc/en/Tutorial/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
}

This worked for some reason, and now everything is working fine.
I just wanted to post this to help others with the same issue. This may be a repost, but I looked for a long time and could not find anything like this.

Thanks so much for taking the time to share your findings @smallguy89!

smallguy89:
now everything is working fine.

Are you now able to upload the original "Connect to WiFi and Blynk servers, when data is received (Blynk Bridge widget), move accordingly" sketch to the Uno WiFi Rev2 without getting that "failed to send command to serial port" error?

You have saved many people from similar problems. I remember how I suffered for a long time with a weak Internet speed. It was a horror. I thought that the problem was in the router, but after I borrowed a router from a friend, I was convinced that the problem was not in it. I called the guys who installed the Internet for me and said that the Internet speed is very low. The guys came and started looking at what was going on, but they didn't find a problem. I started looking for the problem on the Internet and read that the Internet speed can be improved if I go here 192.168.1.254

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