• 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);});
    
    
About