from machine import Pin,ADC
from utime import sleep
BoutonVert = Pin(25, Pin.IN,Pin.PULL_UP)
potar = ADC(Pin(34))
led = Pin(15, Pin.OUT)
#Moteur pas à pas
IN1 = Pin(26,Pin.OUT)
IN2 = Pin(25,Pin.OUT)
IN3 = Pin(33,Pin.OUT)
IN4 = Pin(32,Pin.OUT)
pins = [IN1, IN2, IN3, IN4]
while True:
print(potar.read())
sleep(0.5)
if BoutonVert.value() == 0:
#print("appuyé")
led.value(1)
else:
#print("no appuyé")
led.value(0)