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:
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."
Please help to run one simple example.
I think this screen may help to understand my problem:
-
Did you reboot your PC after installing drivers?Dampmaskin– Dampmaskin2017年10月20日 11:34:14 +00:00Commented Oct 20, 2017 at 11:34
3 Answers 3
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
-
1So - you don't have a genuine Arduino then... Some cheap far-east inferior quality clone...Majenko– Majenko2017年10月20日 12:47:13 +00:00Commented Oct 20, 2017 at 12:47
-
Tried everything but in the end these Chinese drivers works. Yes its not a genuine arduino. but its open source and anybody can make and manufacture it.bradley101– bradley1012021年05月13日 05:23:44 +00:00Commented May 13, 2021 at 5:23
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
-
I do everything(but not change other arduino) but does not meter, I think USB driver is not install correctly.Avtandil Kavrelishvili– Avtandil Kavrelishvili2017年10月20日 11:44:11 +00:00Commented Oct 20, 2017 at 11:44
-
In that case the last option should fix it (maybe deinstall IDE first just for certainty)Michel Keijzers– Michel Keijzers2017年10月20日 11:46:57 +00:00Commented Oct 20, 2017 at 11:46
-
ok, I'll try it one more time. but, I think best way to fix this issue is throw arduino into trashAvtandil Kavrelishvili– Avtandil Kavrelishvili2017年10月20日 11:52:52 +00:00Commented Oct 20, 2017 at 11:52
-
nothing change, IDE can not connect to device.Avtandil Kavrelishvili– Avtandil Kavrelishvili2017年10月20日 12:03:44 +00:00Commented Oct 20, 2017 at 12:03
-
1I'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– Avtandil Kavrelishvili2017年10月20日 12:27:44 +00:00Commented Oct 20, 2017 at 12:27
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.