PDA

View Full Version : [Question(s)] SSC32 in Linux C programming?



nik2031
01-18-2009, 02:55 AM
Hi guys:veryhappy:, I am a new member.

I am having a big problem to communicate with SSC32 servo controller using Linux (Debian) C programming. What I did is ' int byte = write(fd, "#0P1700\r\n", 1); ' but what I notice is the LED's light gone. Do anyone knows what to send in this case?

I have checked the wire connection and baudrate and everything seem alright. I read few thread in this forum regarding similar problem and found less clue for me. Hope the expert can help.

Thanks!

Adrenalynn
01-18-2009, 11:53 AM
Hi, Welcome to the forum!

There's no good purpose to the \n. The SSC32 is suppose to ignore newlines, though, so you're probably ok - but get rid of it anyway. Wasted data.

It's normal for the light to go out when it starts accepting commands. If you unplug it and plug it back in to power - the light comes back on, right?

You didn't provide us with enough code to diagnose what you're doing, I'm afraid.

nik2031
01-18-2009, 09:30 PM
Thank for the comment, Adrenalynn. I have figured out the correct way to write the command.
To whom suffer fom this problem, what I did in Linux C is ' int byte = write(fd, "#0P1700\r", 8); ', where 'byte'=total of byte sent to port, 'fd'=port address and '8'=total byte of data to be sent.
Thanks :)