First post, Hello!
I am building an ROV with the arduino and was planing on using 2 brushless motors for thrust and turning, and Python script for communication to the usb (4ch Rc controller) using the servo library
I got all channels working but when i plan to use the same channels for turning and forward/reverse it becomes difficult for me (n00b)
If someone knows python code, and wold help to get the motors turn while i go forward etc "any help wold be appreciated "
# X Axis Turning (Utgang 2&3)
if (axis == "X"):
pos = e.dict['value']
# convert joystick position to servo increment, 0-180
move = round(pos * 90, 0)
serv = int(90 + move)
serv1 = int(90 - move)
# and send to Arduino over serial connection
servo.move(1, serv)
servo.move(2, serv1)
# Throttle Forword/backword (Utgang 2&3)
if (axis == "Throttle"):
pos = e.dict['value']
move = round(pos * 90, 0)
serv = int(90 + move)
servo.move(1, serv)
servo.move(2, serv)