Asked
Resolved Resolved by DJ Sures!

Servo Command Code Through A Uart Port. EZB To Kangaroo/Sabertooth To DC Moto

The answer may be easy but the question is very hard to ask. I don't know why this happened...

Anyway, here's my setup: I have several servos on my robot and a DC motor controlled through a Kangaroo X2 attached to a Sabertooth 2X32.  I have the Kangaroo attached to a uart port 1 on an EZB v4 (Digital ports 5 and 6 for Rx & Tx). I usually control the DC motor using simply serial commands in ARC, through the Uart to the Roo. It works great tis way.

Question: I was playing around inside the EZBv4's web interface. In the diagnostic section of the interface there are several buttons that move servos different distances. I'm sure these are to check if your servos are getting the proper signals and work. Anyway, I tried one of these tests and as expected all my servos moved the expected distance. What shocked me was the DC motor attached to the Kangaroo and Uart 1 port on the EZB also moved this distance. Obviously the Roo is getting proper commands from the EZB's web interface to move the DC motor.  Like mentioned above, I have always used Simple Serial code to move DC motors attached to the Roo/Sabertooth. For example (this assumes that the Uart has already been initiated and the Roo's channel has already been started:

uartWrite(2, 2, "2, p412 s750", 0x0d)

Why did the DC motor attached to the Roo move the same amount as all the servos when I told EZB to move all servos? Can I send a servo command to Roo to move a DC motor through a Uart port? If so any idea how it would be written in ARC?

My guess but it doesn't look or seem correct:

uartWrite(2, 2, "2, Servo(D14, 25)", 0x0d)

I can't find any information on this at Dimention Engineering, EZ Robot or Synthiam.


Related Hardware EZ-B v4
Related Control EZ-B v4 Info

ARC Pro

Upgrade to ARC Pro

Unleash your robot's full potential with the cutting-edge features and intuitive programming offered by Synthiam ARC Pro.

#9   — Edited

Hi @Alan, You may be correct. I remember trying to use PWM mode in the Roo back with the V3. I also tried a few other ways to control position. Nothing worked well or at all for me. I really wanted precise position control with feedback and ramping. Ramping was key to me as I wanted a natural looking start and stop of the motors. I almost gave up on the Kangaroo but Toymaker convinced me to keep trying and helped me quite a lot towards my eventual success. Ahhh, those were the days! LOL.

Anyway, as this new thread shows I went back and tried RC mode again feeding the Roo servo commands from ARC through EZB. Thanks to DJ's help I did get it to work by using a digital port instead of the Uart. As stated above I think there is a place for both ways, Simple Serial through the Uart and servo Commands through the Digital ports. I think it mostly depends what you want to e motors to do and where they are used.