Most recent activity
-
____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |____|___| _|_| |___|_|_|_|___| |_| espruino.com 2v08.80 (c) 2019 G.Williams Espruino is Open Source. Our work is supported only by sales of official boards and donations: http://espruino.com/Donate Flash map 512KB:256/256, manuf 0xc8 chip 0x4013 >di digitalPulse digitalRead digitalWrite >digitalWrite(D13,1) =undefined >digitalPulse(D13,1,10) =undefined Uncaught Error: Invalid pin!
Occurs only with digitalPulse ()
-
-
-
// lan-test00 - esp8266_01 var ver = 'ver = V1.0'; function onInit(a) { debug = (typeof a==='undefined')?0:a; var wlan = require("Wifi"); var http = require("http"); var logon = require('LOGON'); wlan.stopAP(); wlan.disconnect(); var boola; function lan() { //wlan.connect(yourssid, {password: yourpassword}, function (s) { wlan.connect(logon.ssid, {password: logon.pass}, function (s) { boola = true; if(s==='bad password') { if(debug)console.log('restart lan'); lan(); } }); if(debug)console.log("Frida is my watchdog"); if(debug)console.log(wlan.getIP().ip); } // end lan() setTimeout(lan,400); wlan.on('connected', function(s) { if(debug)console.log('Starter test', wlan.getIP().ip); if(boola) { boola = false; //do what you need to do. if(debug)console.log('tilsluttet lan'); } }); } // end onInit() onInit(2); // comment or remove before save
You should not use logon and use your own logon values instead. That's because I have my logon values in a module.
I use debug until the program runs properly. -
That mistake I had several years ago
It turned out that one of my routers was teasing.
I use the showed up start and since then there have been no problems.
The other routers have no problems.function lan() { wlan.connect(logon.ssid, {password: logon.pass}, function (s) { boola = true; if(s==='bad password') { if(debug>0) {console.log('restart lan');} lan(); } }); if(debug)console.log("Frida is my watchdog"); if(debug)console.log(wlan.getIP().ip); } // end lan() setTimeout(lan,400); wlan.on('connected', function(s) { if(debug)console.log('Starter test', wlan.getIP().ip); if(boola) { boola = false; startTimeServer(); //httpSrv.listen(80); } });
-
-
I downloaded ver .: 2v08.189 and everything seems as planned.