日本免费高清视频-国产福利视频导航-黄色在线播放国产-天天操天天操天天操天天操|www.shdianci.com

學無先后,達者為師

網站首頁 編程語言 正文

arduino上傳程序出錯不成功常見的問題解決

作者:河西石頭 更新時間: 2022-07-26 編程語言

1、avrdude: ser_open(): can’t open device “\.\COM6”: 系統找不到指定的文件

arduino的IDE無法識別現在的端口,嘗試重新拔插和重新啟動IDE,如果能夠在IDE的端口中找到它即可正常使用,否則還會報錯。
說明:
有的在設備管理器中可以看到虛擬串口,但IDE中不能找到對應的串口,那么,重新啟動IDE即可。
如果電源有多個來源,我們可能會考慮共地,這個時候也會出現共地后IDE無法識別虛擬串口,可以暫時去掉共地連接,再試。

如果上述方法都沒有解決,可以考慮重新安裝串口驅動程序,或者使用VSerialDriverFixer 來修復一下亦可。

2、0號端口或1號端口原始留給串口用的,上傳時不能占用(不能插線,否則報錯)
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00

3、java.io.IOException: jssc.SerialPortException: Port name:這一般屬于熱插拔器件,改變了電流電壓,引起了虛擬串口中斷,重新插拔USB也可以解決
java.io.IOException: jssc.SerialPortException: Port name - COM13; Method name - setEventsMask(); Exception type - Can’t set mask.
at processing.app.Serial.dispose(Serial.java:166)
at processing.app.SerialMonitor.close(SerialMonitor.java:116)
at processing.app.AbstractMonitor.suspend(AbstractMonitor.java:90)
at processing.app.Editor$DefaultExportHandler.run(Editor.java:2182)
at java.lang.Thread.run(Thread.java:748)
Caused by: jssc.SerialPortException: Port name - COM13; Method name - setEventsMask(); Exception type - Can’t set mask.
at jssc.SerialPort.setEventsMask(SerialPort.java:279)
at jssc.SerialPort.removeEventListener(SerialPort.java:1064)
at jssc.SerialPort.closePort(SerialPort.java:1090)
at processing.app.Serial.dispose(Serial.java:163)
… 4 more

4、串口參數錯誤(這種錯誤往往都因為負載太大導致,比如直接掛載了幾個舵機而沒有用外接電源)
avrdude: ser_open(): can’t set com-state for “\.\COM15”
上傳項目出錯
設置串口參數時出錯:9,600 N 8 1

原文鏈接:https://blog.csdn.net/haigear/article/details/125698950

欄目分類
最近更新