I think since 76, at least the build that it shipped with (iirc was 75) was complaining about missing networkjs. Now I've 1v78. Test code is basically the same from the tutorial + some logging:
Serial2.setup(9600, { rx: A3, tx: A2 });
var esp8266 = require("ESP8266WiFi");
console.log("Testing ESP8266...");
var wifi = esp8266.connect(Serial2, function(err) {
console.log("Connected, reseting...");
if (err) throw err;
wifi.reset(function(err) {
if (err) throw err;
console.log("Connecting to WiFi");
wifi.connect("ssid","pass", 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);
});
});
});
});
});
I get this consistently, never works. I tried 3 different ESP8266 modules I have, and it's all the same. I tried 9600 and 115200 setup. In fact, I even tried disconnecting everything and I get the same error, so, something must be really wrong on my side I guess.
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.
I think since 76, at least the build that it shipped with (iirc was 75) was complaining about missing networkjs. Now I've 1v78. Test code is basically the same from the tutorial + some logging:
I get this consistently, never works. I tried 3 different ESP8266 modules I have, and it's all the same. I tried 9600 and 115200 setup. In fact, I even tried disconnecting everything and I get the same error, so, something must be really wrong on my side I guess.