Not sure if this is the appropriate thread, though I am using a USB to serial port adapter…
I’m trying to send my arm commands within Ubuntu. I’ve tried using minicom, LibSerial and just-plain writing to a file c-style; none of these work. However, I can use the GNU “screen” command like this
screen /dev/ttyUSB0 115200
and it works fine.
The programmatic techniques, namely LibSerial and file-writing, cause the LED to turn off and blink when I send the command, but he arm never moves. Here is my LibSerial code:
SerialStream serialPort;
serialPort.Open("/dev/ttyUSB0");
serialPort.SetBaudRate(SerialStreamBuf::BAUD_115200);
serialPort.SetNumOfStopBits(1);
serialPort.SetCharSize( SerialStreamBuf::CHAR_SIZE_8 ) ;
serialPort.SetParity( SerialStreamBuf::PARITY_NONE ) ;
serialPort.SetFlowControl( SerialStreamBuf::FLOW_CONTROL_NONE ) ;
serialPort << "#0 P1500 S500 #1 P2250 S500 #2 P1500 S500 #3 P1500\n";
Has anyone communicated with the servo controller within Linux? If so, can you give me some test code that works?