masahen

Blink

Dec 17th, 2019
7,943
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void setup() {
  2.   pinMode(LED_BUILTIN, OUTPUT);     // Initialize the LED_BUILTIN pin as an output
  3. }
  4.  
  5. // the loop function runs over and over again forever
  6. void loop() {
  7.   digitalWrite(LED_BUILTIN, LOW);   // Turn the LED on (Note that LOW is the voltage level
  8.                                     // but actually the LED is on; this is because
  9.                                     // it is active low on the ESP-01)
  10.   delay(1000);                      // Wait for a second
  11.   digitalWrite(LED_BUILTIN, HIGH);  // Turn the LED off by making the voltage HIGH
  12.   delay(2000);                      // Wait for two seconds (to demonstrate the active low LED)
  13. }
Advertisement
Add Comment
Please, Sign In to add comment