Created
May 9, 2022 02:23
-
-
Save makvoid/2cf0cd997559edc5b09c260b4bd65a5e to your computer and use it in GitHub Desktop.
D1 Mini ESP8266 blink example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For the D1 Mini ESP8266 | |
from machine import Pin | |
from time import sleep | |
# Setup the LED | |
led = Pin(2, Pin.OUT) | |
led.value(1) # Turn the LED off initially | |
# Blink the LED 5 times | |
for _ in range(10): | |
led.value(not led.value()) | |
sleep(0.25) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment