# Stepper Motor - Full Stepping from time import sleep_ms from machine import Pin PA = Pin(16,Pin.OUT) PB = Pin(17,Pin.OUT) PC = Pin(18,Pin.OUT) PD = Pin(19,Pin.OUT) TABLE = [1, 2, 4, 8] def Step(X): Y = TABLE[X % 4] PA.value( Y & 8 ) PB.value( Y & 4 ) PC.value( Y & 2 ) PD.value( Y & 1 ) x = 0 for i in range(0,100): x += 1 Step(x) sleep_ms(10)