0

I'm try to connect my Arduino Mega 2560 to PC, but I think it's not easy as I imagine. I spent a lot's of time to install USB driver. Here is a screenshot:

Device manager

When I try to upload blink example, Arduino IDE throw this error:

Sketch uses 656 bytes (0%) of program storage space. Maximum is 253952 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes.
avrdude: ser_open(): can't set com-state for "\\.\COM10"
avrdude: ser_drain(): read error: The handle is invalid."

Screenshot of error

Please help to run one simple example.

I think this screen may help to understand my problem:

COM port selection

1
  • Did you reboot your PC after installing drivers? – Dampmaskin Oct 20 '17 at 11:34
1

I install driver for this site and everything is working well. driver download: wch.cn/download/CH341SER_EXE.html

I'm recommend to unplug arduino first and install driver, after that plug and enjoy.

Here is a video: https://www.youtube.com/watch?v=FhmG5J-AHrg

1
  • 1
    So - you don't have a genuine Arduino then... Some cheap far-east inferior quality clone... – Majenko Oct 20 '17 at 12:47
0

What you can try is:

  • Use another USB port
  • Reopen IDE
  • Reinsert the USB cable
  • Use a different USB cable
  • Prevent using a USB 'box' in between
  • Try a different 2560 (if you have)
  • Restart computer
  • Check if it can be found in the system drivers
  • Reinstall IDE (after deinstall it).

However, as the author already mentioned the real solution is needed for some non-genuine Arduinos:

  • Install the CH driver e.g. at wch.cn/download/CH341SER_EXE.html
8
  • I do everything(but not change other arduino) but does not meter, I think USB driver is not install correctly. – Avtandil Kavrelishvili Oct 20 '17 at 11:44
  • In that case the last option should fix it (maybe deinstall IDE first just for certainty) – Michel Keijzers Oct 20 '17 at 11:46
  • ok, I'll try it one more time. but, I think best way to fix this issue is throw arduino into trash – Avtandil Kavrelishvili Oct 20 '17 at 11:52
  • nothing change, IDE can not connect to device. – Avtandil Kavrelishvili Oct 20 '17 at 12:03
  • 1
    I'm installing this : wch.cn/download/CH341SER_EXE.html and left only this problem: "Sketch uses 1462 bytes (0%) of program storage space. Maximum is 253952 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 8183 bytes for local variables. Maximum is 8192 bytes." – Avtandil Kavrelishvili Oct 20 '17 at 12:27
0

I also got the same error. Then I un-plugged my connections and pressed the reset button. Then I uploaded the default blink example to my board. Then it's working fine. Then again I made a connection to the board and it shows the same error again. Now, I un-plugged the GND pin; it's working again. So, in my case there was some thing wrong with my connections.

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.