Hello All,

I have recently purchased two Dynamixels AX-12A to build a robot arm controlled by a Raspberry Pi v4.

I have wired up the circuit as in the below picture (using only 1 servo).



I have disabled the console on ttyAMA0 as in the instructions in this blog post. I am trying to send an instruction to the motor with the following Python code:

Code:
import serial
import time
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(18, GPIO.OUT)
port = serial.Serial(“/dev/ttyAMA0”, baudrate=1000000, timeout=3.0)
while True:
        GPIO.output(18, GPIO.HIGH)
        port.write(bytearray.fromhex(“FF FF 01 05 03 1E 32 03 A3”))
        time.sleep(0.1)
        GPIO.output(18, GPIO.LOW)
        time.sleep(3)
        GPIO.output(18,GPIO.HIGH)
        port.write(bytearray.fromhex(“FF FF 01 05 03 1E CD 00 0b”))
        time.sleep(0.1)
        GPIO.output(18,GPIO.LOW)
        time.sleep(3)
However the motor is not responding.


I have confirmed that I can send and receive data with through the serial connection if I connect the RX and TX pins on the PI to each other so I think this tells me that I am able to send instructions to the circuit.

I am unsure of what happens to this data once it gets to the circuit. I thought that I may be able to test the Dynamixel if i connect the TX from the Raspberry straight to the DATA pin on the AX-12A but this also doesn't move the servo.

Can anyone give some advice on what might be wrong or other ways to test?

Thank you