最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

我无法在Windows 7上为我的arduino

运维笔记admin19浏览0评论

我无法在Windows 7上为我的arduino

我无法在Windows 7上为我的arduino

运行程序(节点Alarm_system.js)时,会发生以下输出:

λ node Alarm_system.js
1514314162653 Available COM4,COM7,COM1,COM5,COM3
1514314162670 Connected COM4
1514314162673 Error Opening COM4: Unknown error code 1167
(node:4804) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Uncaught, unspecified "error" event. ([object Object])
1514314172672 Device or Firmware Error A timeout occurred while connecting to the Board.

Please check that you've properly flashed the board with the correct firmware.
See: 

If connecting to a Leonardo or Leonardo clone, press the 'Reset' button on the board, wait approximately 11 seconds for complete reset, then run your program again.
events.js:165
      throw err;
回答如下:

您只需配置正确的端口,如下所示:

board = new five.Board({
  port: "COM7"
});

之前的代码:

board = new five.Board();

我需要的是指定一个正确的端口,并获得一个正确的端口,你可以使用Arduino IDE。这是一个很好的网站:ardunino setup project

发布评论

评论列表(0)

  1. 暂无评论