Create gpio2.py
This commit is contained in:
15
gpio2.py
Normal file
15
gpio2.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from machine import Pin
|
||||
import time
|
||||
zelena=pin13=Pin(13, Pin.OUT)
|
||||
rumena=pin15=Pin(15, Pin.OUT)
|
||||
sleeptime=120
|
||||
def blink(cas):
|
||||
for i in range(10):
|
||||
zelena.value(0)
|
||||
rumena.value(1)
|
||||
time.sleep_ms(cas)
|
||||
zelena.value(1)
|
||||
rumena.value(0)
|
||||
time.sleep_ms(cas)
|
||||
print(i)
|
||||
blink(500)
|
||||
Reference in New Issue
Block a user