简体   繁体   English

如何在Ubuntu 15.04上运行johnny-five?

[英]How to run johnny-five on Ubuntu 15.04?

$ node hello.js 
1436894483255 Device(s) /dev/ttyUSB0  
1436894483279 Connected /dev/ttyUSB0  
1436894493287 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: https://github.com/rwaldron/johnny-five/wiki/Getting-Started#trouble-shooting 
events.js:87
      throw Error('Uncaught, unspecified "error" event.');
            ^
Error: Uncaught, unspecified "error" event.
    at Error (native)
    at Board.emit (events.js:87:13)
    at Board.log (/usr/lib/node_modules/johnny-five/lib/board.js:623:8)
    at Board.(anonymous function) [as error] (/usr/lib/node_modules/johnny-five/lib/board.js:634:14)
    at Board.<anonymous> (/usr/lib/node_modules/johnny-five/lib/board.js:407:12)
    at Timer.listOnTimeout (timers.js:119:15)

I have installed node and johnny-five on Ubuntu and connected Arduino Nano. 我已经在Ubuntu上安装了node和johnny-five并连接了Arduino Nano。 But it's throwing the above error. 但这引发了以上错误。

before you run your node app, try to open arduino: 在运行节点应用程序之前,请尝试打开arduino:

$ arduino

go to to file > Examples > Firmata, and choose StandardFirmata 转到文件>示例>固件,然后选择StandardFirmata

once it opens upload it to your arduino. 打开后,将其上传到您的arduino。

when done, you should be able to run your node app without any problems 完成后,您应该可以运行节点应用程序而不会出现任何问题

The arduino IDE might be holding the connection to the board. arduino IDE可能正在保持与开发板的连接。 Try closing it. 尝试关闭它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM