Requiring works. However, connect() succeeds only 1 out of 3 times (power off and on again). Here is my code:
// clean up before: E.setBootCode(); function onInit() { setTimeout(function() { require('Wifi').connect('SSID',{password:'mypassword'}, function(err) { console.log(err); if (err) return; require('net').createServer((conn) => { conn.pipe(LoopbackA); LoopbackA.pipe(conn); LoopbackB.setConsole(); }).listen(23); }); },3000); } // wait a few seconds, then: save();
With the 1v95 build connect() always succeeds.
@Steffen started
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.
Requiring works. However, connect() succeeds only 1 out of 3 times (power off and on again). Here is my code:
With the 1v95 build connect() always succeeds.