Raspberry Pi Pico practice problem · Raspberry Pi Pico
Forward and reverse
HardBudget $26MicroPython
A motor on IN1 GP20, IN2 GP21, ENA GP22, with buttons GP12 (forward) and GP13 (reverse).
Press forward: IN1 high, IN2 low. Press reverse: IN1 low, IN2 high. ENA stays high. Debounce the buttons; the last press wins.