运行程序 (node 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;