Skip to content

Instantly share code, notes, and snippets.

@JerrySievert
Created February 11, 2016 03:54
Show Gist options
  • Select an option

  • Save JerrySievert/6e387f86143a6a26ec86 to your computer and use it in GitHub Desktop.

Select an option

Save JerrySievert/6e387f86143a6a26ec86 to your computer and use it in GitHub Desktop.

Revisions

  1. JerrySievert created this gist Feb 11, 2016.
    22 changes: 22 additions & 0 deletions main.ino
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,22 @@
    #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);
    }