I connected XW540, MX-28 to OpenCR and tried to run the sync_read_write_position example in the Arduino Dynamixel2Arduino library as it is.
Positon control using syncRead works well.
However, only one Dynamixel’s position is read, or both of them does not work, as shown in the following output.
Is there a way to read the positions of two consecutively position-controlled Dynamixels?
In the past I had problems with that example sketch too. I had to go back to an earlier approach (now deprecated) but you still can use it. See post below.
Previously, I connected the MX-28 directly to OpenCR’s 3Pin connector (TTL).
So I think syncRead was not working properly because the XW540 is RS485 and the MX-28 is TTL.
After connecting the MX-28 through DYNAMIXEL Communication Bridge, syncRead works fine.