hackerspace-adelaide / XL320

Arduino library for Dynamixel XL-320 servos
GNU General Public License v2.0
35 stars 23 forks source link

How should I connect the motor? #8

Open carroth15 opened 4 years ago

carroth15 commented 4 years ago

I tried to connect it with arduino board and use the example code to run xl-320 motor but I can't find any information about the pins that I have to connect to the motor. Is there any one who can provide some pictures about it?

sighmon commented 4 years ago

@carroth15 There's a wiring diagram in the README, with an image and description of which pins on the Arduino to connect to. Does that help? https://github.com/hackerspace-adelaide/XL320#wiring-diagram

carroth15 commented 4 years ago

I connected the motor according to the wiring diagram and tried to run the baud rate or id code but nothing happened when I ran the code.

sighmon commented 4 years ago

@carroth15 Have you tried setting it to communicate at 1Mbps? That's what they (used to) come set as out of the factory.

Serial.begin(1000000);

See: https://github.com/hackerspace-adelaide/XL320/blob/master/examples/XL320_servo_example/XL320_servo_example.ino#L32

carroth15 commented 4 years ago

I tried it but after I uploaded the code, weird marks were the only things that I can see on the serial monitor.

sighmon commented 4 years ago

@carroth15 Did you try setting your serial monitor to different speeds? Perhaps it's already been set to some other value?

carroth15 commented 4 years ago

I matched the baud rate of the serial monitor same as the baud rate in the code.

sighmon commented 4 years ago

@carroth15 Try other settings too - sounds like you're getting output, but not the right baud rate on one of the ends.

carroth15 commented 4 years ago

The motor finally started to move! I was able to solve this problem thanks to your help. I really appreciate it! Thanks!

sighmon commented 4 years ago

@carroth15 How did you solve it in the end?

NikeetPandit commented 3 years ago

@carroth15 @sighmon Was anyone able to determine a solution? Currently having the exact same problem, and am not sure where to look.

sighmon commented 3 years ago

@NikeetPandit What have you tried so far?

If you're in Adelaide I can highly recommend attending the Hackerspace session on Thursday nights from 6pm at Makerspace Adelaide: https://makerspaceadelaide.org

They'll be able to help you out.

If you live elsewhere, find your local hackerspace.