ecto / duino

:bulb: Arduino framework for node.js
958 stars 214 forks source link

More robust serial connection establishment & error handling #55

Open tjanson opened 10 years ago

tjanson commented 10 years ago

Instead of trying to establish the serial connection in the Board constructor, delegate this to a separate setup(). (API change!) This allows the user to add listeners to the Board’s error event, which signifies that the connection could not be established. (This was already intended, but wasn't possible, as far as I can tell.) Also displays a more intuitive error message.