I am using Arduino 1.6.13 (Windows) to write and send sketches to NodeMCU. I have a custom NodeMCU built against the master branch. It includes file, gpio, http, mdns, mqtt, net, node, tmr, uart, websocket, wifi - using nodemcu-build.com. It was flashed without problem using esptool.py.
I have a simple sketch, which reacts on button press with a flashing led and runs a small PHP script on server side).
#include <ESP8266WiFi.h>
const char* ssid = "blahblahblah";
const char* password = "blahblahblahblah";
const int ledPin = D7;
const int buttonPin = D2;
void setup() {
pinMode(ledPin, OUTPUT);
pinMode(buttonPin, INPUT_PULLUP);
Serial.begin(115200);
delay(10);
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
}
}
void loop() {
if (digitalRead(buttonPin) == LOW) {
digitalWrite(ledPin, HIGH);
delay(1000);
http.get("http://192.168.1.128/");
digitalWrite(ledPin, LOW);
}
}
Result of verification is:
In function 'void loop()': button_check_yapp:24: error: 'http' was not declared in this scope http.get("http://192.168.1.128/"); ^ exit status 1 'http' was not declared in this scope
What's wrong? What I did miss?
Thank you.