On an ESP8266 running v1.85
var wifi = require("Wifi"); wifi.connect(Netname, {password:Key}, function(err){ console.log("connected? err=", err, "info=", wifi.getIP()); });
On an Espruino v1.85 board connected to an AT command ESP8266
var wifi = require("ESP8266WiFi_0v25").connect(serial, function(err) { if (err) throw err; wifi.reset(function(err) { if (err) throw err; console.log("Connecting to WiFi"); wifi.connect(SSID,key, function(err) { if (err) throw err; wifi.getIP(function(l,ip){console.log("IP= ",ip,"\n\r"+l);});
@ClearMemory041063 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.
On an ESP8266 running v1.85
On an Espruino v1.85 board connected to an AT command ESP8266