I'm trying to run a DC motor off my Raspberry Pi Pico, so I got this motor driver off Adafruit. I'm trying to follow a bunch of tutorials, and eventually gave up trying to find documentation in C and went with Micropython. Right now, both motors I have will make a little buzzing/whining sound, but not turn. I'm not sure if this means they're not getting enough power, or if something is wired incorrectly.
I've included a power supply module on my board, which is plugged into a 5V 1A wall adaptor, so I thought I'd avoid having inadequate power...
This is the code that makes the whining noise:
Code: Select all
import utime
from machine import Pin
motor1a = Pin(14, Pin.OUT)
motor1b = Pin(15, Pin.OUT)
def forward():
motor1a.high()
motor1b.low()
def backward():
motor1a.low()
motor1b.high()
def stop():
motor1a.low()
motor1b.low()
def test():
forward()
utime.sleep(2)
backward()
utime.sleep(2)
stop()
for i in range(5):
test()