Hi - yes, LoopbackB.write(digitalWrite(D5,1)); will fail because digitalWrite returns undefined. However if you're using loopback normally (just passing data from websockets) it shouldn't be an issue.
I'd be pretty sure your issue is that you're calling LoopbackA.setConsole(); at the start of upload.
What's happening is you call that, then the console moves out of the way to Loopback, and all code after that command gets ignored! :)
Add setTimeout(function() {LoopbackA.setConsole();},1o0); at the end of your code - or call setConsole when you actually get a websocket connection.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Hi - yes,
LoopbackB.write(digitalWrite(D5,1));
will fail becausedigitalWrite
returns undefined. However if you're using loopback normally (just passing data from websockets) it shouldn't be an issue.I'd be pretty sure your issue is that you're calling
LoopbackA.setConsole();
at the start of upload.What's happening is you call that, then the console moves out of the way to Loopback, and all code after that command gets ignored! :)
Add
setTimeout(function() {LoopbackA.setConsole();},1o0);
at the end of your code - or callsetConsole
when you actually get a websocket connection.