2017-12-26 4 views
-5

는, 다음과 같은 결과가 발생합니다 (I은 포트 문제가 발생) :나는 윈도우 7에 내 아두 이노 - 우노 내 JS 파일을 실행할 수 없습니다 프로그램 (노드 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: https://github.com/rwaldron/johnny-five/wiki/Getting-Started#trouble-shooting 

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; 

답변

0

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

코드 전에 :

내가 필요한 모든에서
board = new five.Board(); 

될 것입니다의 당신은 다음과 같은 올바른 포트 구성해야 알맞은 포트를 지정하고 올바른 포트를 얻으려면 Arduino IDE를 사용할 수 있습니다. 다음은 좋은 사이트입니다. ardunino setup project