var wifi = require("ESP8266WiFi_0v25").connect(Serial2, function(err){ wifi.getVersion(print); });
> null undefined
The code I'm using from espruino.com/ESP8266:
digitalWrite(B9,1); digitalWrite(A1,0); digitalWrite(A10,0); digitalWrite(A10,1); Serial2.setup(115200, { rx: A3, tx: A2 }); Serial2.on('data', function(d) { USB.write(d); }); USB.on('data', function(d) { Serial2.write(d); }); Serial1.setConsole();
digitalWrite(B9,1); Serial2.setup(115200, { rx: A3, tx: A2 }); var wifi = require("ESP8266WiFi_0v25").connect(Serial2, function(err){ if (err) throw err; console.log("Connecting to WiFi"); wifi.connect("MY_LAN", "PASSWORD", function(err){ if (err) throw err; console.log("Connected"); require("http").get("http://www.pur3.co.uk/hello.txt", function(res){ console.log("Response: ", res); res.on('data', function(d){ console.log("--->"+d); }); }); }); });
@CriscoCrusader started
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.
> null undefined
The code I'm using from espruino.com/ESP8266: