So for the SQ3 i was able to make it move via bidirectional serial communication , but not with the SoftwareSerial library in the arduino.
Here a link to the images (i didn’t put it here because it become abnormally big)
The yellow wire is on pin 13 (RX) and connect to the TX on the SSC 32
The black wire is on pin 12 (RX) and connect to the RX on the SSC 32
The green wire is on pin 13 (GND) and connect to the GND on the SSC 32.
I am using the usb plugin as substitute for the 9V logic for the botboarduino.
the code i use for testing :
[code]#include <SoftwareSerial.h>
#define cSSC_OUT 12 //Output pin for (SSC32 RX) on BotBoard (Yellow)
#define cSSC_IN 13 //Input pin for (SSC32 TX) on BotBoard (Blue)
#define cSSC_BAUD 38400 //SSC32 BAUD rate
SoftwareSerial SSCSerial(cSSC_IN, cSSC_OUT); // where I have the pins defined in a config file:
void setup() {
SSCSerial.begin(cSSC_BAUD );
}
void move_servo(int servo, int angle, int time) {
SSCSerial.print("#");
SSCSerial.print(servo);
SSCSerial.print(" P");
SSCSerial.print(angle);
SSCSerial.print(" T");
SSCSerial.println(time);
}
void loop(){
move_servo(1, 2000, 500);
delay(500);
move_servo(1, 1000, 500);
delay(500);
}[/code]
I think the problem is that both board is not having a common ground, but i am not sure where to connect the GND in the botboarduino.
Thank you,