Main Site Documentation

Some help understanding a manual


#1

Hi guys

Im sitting with my Panda 2, and this serial controlled servo controller: http://www.pololu.com/file/download/ssc03a_guide.pdf?file_id=0J37

And it got 2 modes. a super simple one, where i can send a couple of byte values (servo number and position)…
As described on page 5…
That works perfectly, but i really wanna use the more advanced mode (Pololu mode, Page 6), so i can fx. set a speed of rotation.
But i cant seem to understand exactly what to send for that.

This i what ive done:
I removed the jumper, to enable the Pololu Mode.
Then ive made some code to send, what i think is right:


public void MoveTo2(byte servoNumber, byte servoPos, byte speed = 0, byte sync = 128, byte deviceId = 1)
        {
            //Set speed
            SendBytes(sync);
            SendBytes(deviceId);
            SendBytes(1);
            SendBytes(servoNumber);
            SendBytes(speed);

            //Set posistion
            SendBytes(sync);
            SendBytes(deviceId);
            SendBytes(2);
            SendBytes(servoNumber);
            SendBytes(servoPos);
        }
        
        private void SendBytes(byte data)
        {
            byte[] dataToSend = { data };
            _serial.Write(dataToSend, 0, dataToSend.Length);
        }

        //Using it like this:
        SerialServo.MoveTo2(0,254,80);

But i get a red LED lighting up, that means fatal error.
So i guess im sending something wrong…

Anyone who can understand what series of bytes i should send?


#2

What baud rate are you using in the pololu mode? Try different rates. Make sure that speed and position values are within the specification as well.


#3

(wild guess) Have you tried checking the servo numbers? My thinking is that this would be a simple sanity check.

[quote]If you want to just see the servo numbers setting without changing it, use the above
command, but use the value 16 for . The servo number settings will remain unchanged, but the green LED will flash to indicate the servo numbers, as described above.[/quote]


#4

I found a class for controlling it…

That works like a charm, think ill look at the source code, and get a understanding