I'm trying to run the wifi shield example, but I'm getting this error:
Uncaught Error: Function "getSerial" not found!
at line 2 col 11
Serial1.getSerial();
^
in function "go" called from line 48 col 4
go();
Not sure where to go, I don't see any other errors like this on the forum
Full Code:
var WIFI_NAME = "The LAN Before Time";
var WIFI_PASS = "redact";
var wifi;
function getPage() {
require("http").get("http://www.pur3.co.uk/hello.txt", function(res) {
console.log("Response: ",res);
res.on('data', function(d) {
console.log("--->"+d);
});
});
}
function go() {
Serial1.setup(115200,{rx:D0,tx:D1});
Serial1.getSerial();
wifi = require("ESP8266WiFi_0v25").connect(Serial1, function(err) {
if (err) console.log(err);
console.log("Connecting to WiFi");
wifi.connect(WIFI_NAME, WIFI_PASS, function(err) {
if (err) console.log(err);
console.log("Connected");
// Now you can do something, like an HTTP request
getPage();
});
});
}
function onInit() {
Terminal.setConsole();
}
go();
Search Options
Types to Display
Espruino
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.
Hey there,
I'm trying to run the wifi shield example, but I'm getting this error:
Not sure where to go, I don't see any other errors like this on the forum
Full Code: