regarding raspberry pi and DHB 10 connection

Can we use raspberry pi GPIO pins (don't want to control with serial pins ie; Rx and Tx pins)to control channel 1 and channel 2 of DHB 10 motor controller board? is it possible?

actually I am trying like this:
CH 1: white pin to GPIO 17
black pin to ground
Red pin with no connection
CH 2: white pin to GPIO 18
black pin to ground
Red pin with no connection

but motors are not running .

code:

import time
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setwarnings(False)
GPIO.setup(17,GPIO.OUT)
GPIO.setup(18,GPIO.OUT)

print('Starting motor sequence!')

while True:
try:
GPIO.output(17, True)
GPIO.output(18, False)
time.sleep(3)

GPIO.output(17, False)
GPIO.output(18, True)
time.sleep(3)

except(KeyboardInterrupt):
print('Finishing up!')
GPIO.output(17, False)
GPIO.output(18, False)
quit()
Sign In or Register to comment.