Last active
May 3, 2018 05:20
-
-
Save boochow/aafb62bad615f66f4e2c300fd6307929 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from machine import Pin,Timer | |
led = Pin(47) | |
led.init(led.OUT) | |
def led_toggle(t): | |
global led | |
led.value(1 - led.value()) | |
tim = Timer(3) | |
tim.init(period=500000,mode=tim.PERIODIC,callback=lambda t:led_toggle(t)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment