You are reading a single comment by @Hawky and its replies.
Click here to read the full conversation.
-
In fact I tried different code like :
Serial2.setup(115200, { rx: A3, tx : A2 }); var wifi = require("ESP8266WiFi_0v25").connect(Serial2, function(err) { // ^^^^^^^^^^^^^^^^ // Use ESP8266WiFi here (and 9600 baud) if you have an ESP8266 with firmware older than 0.25 if (err) throw err; wifi.reset(function(err) { if (err) throw err; console.log("Connecting to WiFi"); wifi.connect("WiFi_Name","WPA2_Key", function(err) { if (err) throw err; console.log("Connected"); // Now you can do something, like an HTTP request require("http").get("http://www.pur3.co.uk/hello.txt", function(res) { console.log("Response: ",res); res.on('data', function(d) { console.log("--->"+d); }); }); }); }); });
return http and NetworkJS modules not found
>var wifi = require("Wifi"); =function () { [native code] } >wifi.connect("my-ssid", {password: "my-password"}, function(err){if(err)console.log(err);else console.log("connected!");}) =undefined
return Wifi module not found.
I flashed it with esptool, and I am trying to communicate with my esp8266 using Chrome web IDE.
What tools/code are you using to try and connect?