mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
13 lines
178 B
Python
13 lines
178 B
Python
from gpiozero import LED
|
|
from random import randint
|
|
from signal import pause
|
|
|
|
def rand():
|
|
while True:
|
|
yield randint(0, 1)
|
|
|
|
led = LED(17)
|
|
led.source = rand()
|
|
|
|
pause()
|