Created
March 11, 2021 18:31
-
-
Save bboyho/bf1d190cff0f8793788a5e495e6cc395 to your computer and use it in GitHub Desktop.
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
# ========== DESCRIPTION========== | |
# The following code was originally written by | |
# the Raspberry Pi Foundation. You can find this | |
# example on GitHub. | |
# | |
# https://github.com/raspberrypi/pico-micropython-examples/blob/master/blink/blink.py | |
# | |
# Note that the GPIO for the LED was adjusted | |
# for the Pro Micro RP2040. Make sure to use | |
# a current limiting resistor with the LED. | |
from machine import Pin, Timer | |
led = Pin(17, Pin.OUT) | |
tim = Timer() | |
def tick(timer): | |
global led | |
led.toggle() | |
tim.init(freq=2.5, mode=Timer.PERIODIC, callback=tick) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment