I assume that we need ESP8266WiFi.js, but the module crashes with
WARNING: Parent must be an object - not a String, Integer, etc.
Uncaught Error: Field or method "write" does not already exist, and can't create it on String
at line 1 col 69
...og("["+JSON.stringify(a)),l.write(a),c){var e=setTimeout(fun...
^
in function "cmd" called from line 2 col 142
...ter AT+RST");else return b})
^
in function "reset" called from line 1 col 94
...egister("+IPD",n);l.reset(c);return l
^
in function "connect" called from line 4 col 1
);
^
trying to complete a simple task
var wifi = require("ESP8266WiFi");
wifi.connect ("mySSID", {password:"myPWD"}, function (){
console.log ("Connected to ap");
}
);
/*
wifi.setIP ({ip:"192.168.1.50", gw:"192.168.1.1", netmask:"255.155.255.0"}, function (){
console.log ("Ip set");
}
);*/
Function wifi.setIP is defined in reference but there is no such function in module.
What I`m doing wrong?
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.
In any tutorial of using ESP8266 written that the module should be called like that
But there is no Wifi.js in http://www.espruino.com/modules directory. And the terminal callback
confirms that
I assume that we need ESP8266WiFi.js, but the module crashes with
trying to complete a simple task
Function wifi.setIP is defined in reference but there is no such function in module.
What I`m doing wrong?