0

Board: Arduino Leonardo

IDE version: 1.6.5(also tried with 1.8.3)

Try Arduino Web Editor as well

The problem: after connecting Arduino to PC via USB in 5-7 seconds IDE says that connection is losted.

Everything was OK, but after one deploy happened thing, that I described.

If it help: I connect OLED display and use it with OLED_I2C library. Sketch contains one cpp and one h file.

I'm already fully reinstall USB drivers with Arduino USB as well

2

The problem: after connecting Arduino to PC via USB in 5-7 seconds IDE says that connection is losted.

Yes, that's normal. That's the bootloader running, and it's during that 5-7 second window that you can upload a new sketch.

Under normal circumstances the IDE will automatically reboot the board for you so the upload time window coincides with the IDE's attempt to upload a new sketch. However under some circumstances it can't, so you have to do it manually by pressing the reset button at the right time.

Also on Windows you may find that you have a different COM port for programming as you do when a sketch is running (Windows is retarded like that, you see). The IDE tries to do some magic to identify the correct COM port to use, but you have to first have the correct "sketch mode" COM port selected so it can first reboot the board into the bootloader, at which point it tries to do its magic to work out the correct COM port to use by looking to see which COM port (if any) has just appeared since rebooting.

So, in short: if the IDE can't reboot the board for you then do it manually, but note that timing is vital. Press the reset button a few moments before avrdude runs. It may take practice.

  • Well, it's seems a little bit strange, but it's work. Thanks :D – Oleh Kurpiak Oct 11 '17 at 16:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.