I try to run my first project which is star tracking device. First of all i try connect Raspberry Pi + L298n + 42shd0404-22 and run simple script but i have problems with stepper motor which shaking, lack of torque and have no power to spin. Motor is supplying by 12v max 5A supply.
Code: Select all
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(200): for halfstep in range(8): for pin in range(4): GPIO.output(ControlPin[pin], seq[halfstep][pin]) time.sleep(0.01) GPIO.cleanup() ... sp=sharing
any idea what is wrong?