Skip to content

Instantly share code, notes, and snippets.

@JerrySievert
Created February 11, 2016 03:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JerrySievert/6e387f86143a6a26ec86 to your computer and use it in GitHub Desktop.
Save JerrySievert/6e387f86143a6a26ec86 to your computer and use it in GitHub Desktop.
hello world, esp8266
#include <ESP8266WiFi.h>
void setup() {
Serial.begin(115200);
Serial.println("Setup");
pinMode(D2, OUTPUT);
}
void loop() {
static int state = LOW;
if (state == LOW) {
digitalWrite(D2, HIGH);
state = HIGH;
} else {
digitalWrite(D2, LOW);
state = LOW;
}
delay(1000);
}
@jymmm
Copy link

jymmm commented Feb 12, 2016

: error: 'D2' was not declared in this scope
digitalWrite(D2, HIGH);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment