We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60c9721 commit b886b2fCopy full SHA for b886b2f
src/board/Bit.js
@@ -1,10 +1,10 @@
1
-+(function(factory) {
++(function (factory) {
2
if (typeof exports === 'undefined') {
3
factory(webduino || {});
4
} else {
5
module.exports = factory;
6
}
7
-}(function(scope) {
+}(function (scope) {
8
'use strict';
9
10
var util = scope.util,
@@ -54,6 +54,16 @@
54
55
Bit.DEFAULT_SERVER = 'wss://ws.webduino.io:443';
56
57
+ proto.startup = async function () {
58
+ this._isReady = true;
59
+ if (this._options.transport === 'serial') {
60
+ // wait for physical board ready to receive data from serialPort
61
+ await delay(0.5);
62
+ this.send([0xf0, 0x0e, 0x0c, 0xf7]);
63
+ }
64
+ this.emit(BoardEvent.READY, this);
65
+ };
66
+
67
68
scope.board.Bit = Bit;
69
0 commit comments