'''
'''
from machine import Pin
import utime
DIR_PINA = 2
DIR_PINB = 4
STEP_PINA = 3
STEP_PINB = 5
BTTA = 6
BTTB = 7
def setup():
Pin(STEP_PINA,Pin.OUT)
Pin(DIR_PINA,Pin.OUT)
Pin(STEP_PINB,Pin.OUT)
Pin(DIR_PINB,Pin.OUT)
Pin(BTTA,Pin.IN)
Pin(BTTB,Pin.IN)
def main():
avanzar()
def avanzar():
Pin(DIR_PINA,Pin.OUT).on()
Pin(DIR_PINB,Pin.OUT).on()
Pin(STEP_PINA,Pin.OUT).on()
Pin(STEP_PINB,Pin.OUT).on()
utime.sleep_ms(5)
Pin(STEP_PINA,Pin.OUT).off()
Pin(STEP_PINB,Pin.OUT).off()
utime.sleep_ms(5)
while True:
main()
pico:GP0
pico:GP1
pico:GND.1
pico:GP2
pico:GP3
pico:GP4
pico:GP5
pico:GND.2
pico:GP6
pico:GP7
pico:GP8
pico:GP9
pico:GND.3
pico:GP10
pico:GP11
pico:GP12
pico:GP13
pico:GND.4
pico:GP14
pico:GP15
pico:GP16
pico:GP17
pico:GND.5
pico:GP18
pico:GP19
pico:GP20
pico:GP21
pico:GND.6
pico:GP22
pico:RUN
pico:GP26
pico:GP27
pico:GND.7
pico:GP28
pico:ADC_VREF
pico:3V3
pico:3V3_EN
pico:GND.8
pico:VSYS
pico:VBUS
drv1:ENABLE
drv1:MS1
drv1:MS2
drv1:MS3
drv1:RESET
drv1:SLEEP
drv1:STEP
drv1:DIR
drv1:GND.1
drv1:VDD
drv1:1B
drv1:1A
drv1:2A
drv1:2B
drv1:GND.2
drv1:VMOT
drv2:ENABLE
drv2:MS1
drv2:MS2
drv2:MS3
drv2:RESET
drv2:SLEEP
drv2:STEP
drv2:DIR
drv2:GND.1
drv2:VDD
drv2:1B
drv2:1A
drv2:2A
drv2:2B
drv2:GND.2
drv2:VMOT
stepper1:A-
stepper1:A+
stepper1:B+
stepper1:B-
stepper2:A-
stepper2:A+
stepper2:B+
stepper2:B-
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
btn2:1.l
btn2:2.l
btn2:1.r
btn2:2.r