-
• #2
IIRC, there is a post that the module name has to be written in lowercase:
var wifi = require("wifi"); -
• #3
Uppercase "Wifi" in later builds. Are you connected - do you get a return from wifi.getIP()? It was case that warnings could be ignored. I don't recall seeing in more recent builds.
-
• #4
The warning will go away once the web site is updated with v1.85... Please ignore the warning for now.
-
• #5
It does not connect. Since the module is not found each line produces an error. Am I missing a step?
Looking at the espruino\modules site there is no Wifi module there.
-
• #6
it would help if you posted what you see, starting with
reset()
... what does it output (shows which version you're running) and then what do you input, etc... -
• #7
Straight forwards normally. You've missed nothing in your JS code as far as I can see. What build have you flashed?
But also, note the build post in this forum (http://forum.espruino.com/conversations/279176/) has the latest build at the end of the thread. If you are using an early build you could well be seeing wacky stuff as well as using a deprecated API. Could this be it?
-
• #8
You were correct. I had loaded an old version by mistake. Works now.
Just loaded up espruino on a nodemcu and trying the sample code...
var wifi = require("Wifi");
wifi.connect("my-ssid", {password:"my-pwd"}, function(err){
console.log("connected? err=", err, "info=", wifi.getIP());
});
wifi.stopAP();
I keep getting Warning: "Wifi" module not found.
What am I doing wrong?