shobley
02-13-2007, 10:20 AM
I'm having a few problems getting the Sabretooth to respond to serial data.
I have a serial to TTL cable and I've wired the Gnd, Vcc and TX lines into 0v, 5v and S1 respectively.
When I power up the Sabretooth I get Status Ind 1 on, and that's pretty much it.
My DIP switches are set
1: Off
2: Off
3: On
4: On
5: On
6: On
Address = 128
I've tested my Serial <-> TTL cable on hyperterm, and when I connect TX <-> RX I get echo from the cable - so it seems to be OK.
I also wired in an 11K pot to the Sabretooth in Analog mode, and I got "steering" on S1 - turning one way turned motor 1 and the other way motor2 - so I think that the Sabretooth is working.
My software sends 170 - the bauding character first, but the light stays on and nothing happens.
Is there a packetized serial test app for the Sabretooth somewhere?
Oh yes, and I'm sending 4 bytes to the serial port like this:
byte[] _result = new byte[4];
_result[0] = 128; //Address
_result[1] = Convert.ToByte(iCommand);
_result[2] = Convert.ToByte(iData);
// Gotta use an int here
int i = _result[0] + _result[1] + _result[2];
_result[3] = Convert.ToByte(i);
_result[3] &= 127;
_serialPort.Write(_result, 0, _result.Length);
My port settings are 2400-8-N-1
Anyone got any ideas...?
Thanks,
Steve
I have a serial to TTL cable and I've wired the Gnd, Vcc and TX lines into 0v, 5v and S1 respectively.
When I power up the Sabretooth I get Status Ind 1 on, and that's pretty much it.
My DIP switches are set
1: Off
2: Off
3: On
4: On
5: On
6: On
Address = 128
I've tested my Serial <-> TTL cable on hyperterm, and when I connect TX <-> RX I get echo from the cable - so it seems to be OK.
I also wired in an 11K pot to the Sabretooth in Analog mode, and I got "steering" on S1 - turning one way turned motor 1 and the other way motor2 - so I think that the Sabretooth is working.
My software sends 170 - the bauding character first, but the light stays on and nothing happens.
Is there a packetized serial test app for the Sabretooth somewhere?
Oh yes, and I'm sending 4 bytes to the serial port like this:
byte[] _result = new byte[4];
_result[0] = 128; //Address
_result[1] = Convert.ToByte(iCommand);
_result[2] = Convert.ToByte(iData);
// Gotta use an int here
int i = _result[0] + _result[1] + _result[2];
_result[3] = Convert.ToByte(i);
_result[3] &= 127;
_serialPort.Write(_result, 0, _result.Length);
My port settings are 2400-8-N-1
Anyone got any ideas...?
Thanks,
Steve