Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 10 months ago.
serial commands to ssc-32
Hi,
Basically I am using an lpc1786 to send a commend to a servo controller board, scc-32, in order to move a servo. The code I have tried is as follows:
ssc
#include "mbed.h" Serial ssc(p9, p10); // tx, rx int main() { ssc.baud(9600); ssc.printf("#4P1500\n"); ssc.printf("#4P1000T500\n"); }
I have tried variants of it but no luck. I have the tx s connected to rx s and ground to ground. Also set the baud rate to 9600 on the board and both boards and the servo is powered. The green light on the ssc-32 blinks every time I send, which means it received a valid byte.
In the user guide it also says: All SSC-32 commands must end with a carriage return character (ASCII 13). In Arduino this can be done using the serial.println(); command.
I am not sure if the printf command is the one I should be using but I guess so. Hence as far as I can see I am doing everything as I am supposed to and am at a loss. Any help appreciated!
Thanks Lanfear
SSC-32 user guide: http://www.lynxmotion.com/images/data/lynxmotion_ssc-32u_usb_user_guide.pdf