Digital Output

Creation of the blue LED - Won a Nobel Prize!

Code

"""
Digital Output Demo Code
Breadstick Innovations
April 26, 2024
https://learn.breadstick.ca/breadstick/breadsticks/raspberry-breadstick/code-examples/digital-output
"""

from board import *
from digitalio import DigitalInOut
from time import sleep

led_5 = DigitalInOut(D5)
led_5.switch_to_output()

while True:
    led_5.value = True
    sleep(1)
    led_5.value = False
    sleep(1)

Last updated