from machine import Pin
import time
pins = [16, 17, 18, 19, 20, 21, 22, 26, 27, 28]
flowlightPins = pins + reversed(pins)
def showFlowLight():
global flowlightPins
for pin in flowlightPins:
showLed(pin)
def showLed(pin):
print(pin)
led = Pin(pin, Pin.OUT)
led.value(1)
time.sleep_ms(100)
led.value(0)
time.sleep_ms(100)
while True:
showFlowLight()
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme