I am new to these types of projects and mostly program so I don't understand completely the functions so it would help if your answer was thoroughly explained.
What my project is we have a python script that sends commands to adafruit which should turn the motor but doesn't. The lights turn on so the motherboard receives the signal, and it seems to get the proper output but it still won't turn
- Servo Motor 28BYJ-48
- Power Supply: 4 X AA BATTERY HOLDER WITH ON/OFF SWITCH
- Adafruit 16-channel 12-bit pwm/servo driver with rasberry pi
"The four batteries are held in series, for a nominal output of 6V DC for alkaline (6.4V when fresh, 4V when dead), and 4.8V DC for rechargeables (5.2V when fully charged, 4.4V when discharged). Using rechargeables will make this work nicely with nearly any 5V project, with alkalines you may want to put a 1N4001 in series to drop the voltage from 6V down to 5.3V."
We use the following code to attempt to turn the servo
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BOARD)
ControlPin = [7, 11, 13, 15]
for pin in ControlPin:
GPIO.setup(pin, GPIO.OUT)
GPIO.output(pin, 0)
seq [[1,0,0,0],
[1,1,0,0],
[0,1,0,0],
[0,1, 1,0],
[0,0,1,0],
[0,0,1,1],
[0,0,0,1],
[1,0,0,1]
]
for i in range (512):
### GO THROUGH THE SEQUENCE ONCE ####
for halfstep in range(8):
for pin in range(4):
###SET EACH PIN###
GPIO.output(ControlPin[pin], seq[halfstep] [pin])
time.sleep(.001)
GPIO.cleanup()
All the hardware seems to be correct. Everything is connected and the signal is sent, the lights turn on. The servo motor just doesn't turn