Command Formating SSC32

userHead margomael 2012-08-30 04:01:49 4068 Views5 Replies

I've got another question regarding the SSC32.

I'm using an Arduino Mega with a SSC32 (from DFRobots). I'm moving a servo sending the following...
[code]void setup() {


void loop() {

Serial.println("#0 P750 T500");
Serial.println("#0 P2200 T500");

But what I will like to do now is to read the position of the servo at half way of the movement.
I've checked the documentation and it says to use a command like QP <arg> but I don't know how to implement it.

I've tried a few combinations but without any success. I modify the loop as follows...
[code]void loop() {

Serial.println("#0 P750 T500");
Serial.println("#0 P2200 T500");

I assume I should get the position in the Serial Monitor but I may be wrong.

The conexions between Mega and SSC32 are TX from Mega to RX from SSC32 and Grd to grd.

Another question: I've also noticed that if I connect TX from SSC32 to RX from Arduino I can't upload the code. Should I connect TX from SSC32 to a different RX from Arduino like dfrobot to get the data?

2012-09-03 08:50:23 Hi margomael,

Sorry, we no longer have these in stock so I can't do any testing here.

Like I mentioned in my previous post. You might want to try and connect the board directly to your PC and try to obtain the data you want directly from a serial terminal. Once you have it working this way you can have an idea of how it works and write the appropriate code.
userHeadPic Hector
2012-08-31 14:32:40 Hi,

But pulsewith can be translate to an angle and that is what I need. Do you know how to get the pulsewith?

userHeadPic margomael
2012-08-31 08:45:29 Like I said, I could be wrong.

I would suggest first you plugin the SSC32 to your pc directly and try to get the feedback you are looking for directly from a serial terminal. You might want to use something like PuTTy.

I read the document, it doesn't say anything about position feedback.

You can get a movement status update, or you can get the pulsewidth of a servo, but neither is a position indicator...
userHeadPic Hector
2012-08-30 20:08:38 Thanks Hector,

Regarding the serial it makes sense and I learned something didn't know.

Regarding the feedback from servos it will be a shame if it can't be done although why is said in the documentation then. See page 3.


userHeadPic margomael
2012-08-30 08:25:24 Hi,

As far as I know the SSC32 can not actually report back a certain position for a servo. This is due to the type of hobby servos you are using. (I could be wrong)

As for the problems with uploading the sketch. Yes, the problem is that the USB cable uses Serial 0 to upload the sketch to the Arduino. So if you have a MEGA the easiest way to solve this issue is to connect your other devices to Serial1,2, or 3.

If you require accurate position feedback I would recommend the [url=]CDS servos[/url] which use this [url=]driver board[/url]. These servos can work in a daisy chain and can give position feedback.

userHeadPic Hector