loading
 
"Could not initialize on port COM6 speed 38400"
Melanie from United States  [21 posts]
10 years
Scott and I are working with the Java API with DE_Sabertooth to turn a motor. For some reason when the API is executed it throws a message
"Could not initialize on port COM6 speed 38400"
and of course the motors do not turn.

I clearly indicate in the code that this is "COM 5". We are unsure how/why it is looking for COM 6.

rr.execute("<head><version>1.8.5.7</version></head><DE_Sabertooth><motor_4_value>128</motor_4_value>"+
            "<motor_5_max>255</motor_5_max>" +
            "<com_port>5</com_port>" +
            "<motor_15_max>255</motor_15_max>" +
            "<motor_16_max>255</motor_16_max>" +
            "<motor_8_value>128</motor_8_value>" +
            "<motor_14_max>255</motor_14_max>" +
            "<motor_6_max>255</motor_6_max>" +
            "<motor_5_value>128</motor_5_value>" +
            "<motor_9_value>128</motor_9_value>" +
            "<motor_9_max>255</motor_9_max>" +
            "<motor_4_max>255</motor_4_max>" +
            "<motor_1_map>left_motor</motor_1_map>" +
            "<motor_12_value>128</motor_12_value>" +
            "<motor_2_map>right_motor</motor_2_map>" +
            "<motor_13_max>255</motor_13_max>" +
            "<motor_3_max>255</motor_3_max>" +
            "<motor_8_max>255</motor_8_max>" +
            "<motor_10_value>128</motor_10_value>" +
            "<motor_13_value>128</motor_13_value>" +
            "<motor_11_max>255</motor_11_max>" +
            "<motor_12_max>255</motor_12_max>" +
            "<motor_1_max>255</motor_1_max>" +
            "<motor_2_max>255</motor_2_max>" +
            "<motor_14_value>128</motor_14_value>" +
            "<motor_15_value>128</motor_15_value>" +
            "<motor_10_max>255</motor_10_max>" +
            "<motor_6_value>128</motor_6_value>" +
            "<baud_rate>38400</baud_rate>" +
            "<motor_7_value>128</motor_7_value>" +
            "<motor_16_value>128</motor_16_value>" +
            "<motor_11_value>128</motor_11_value>" +
            "<motor_7_max>255</motor_7_max>" +
            "<motor_3_value>128</motor_3_value</DE_Sabertooth>");
Anonymous 10 years
Melanie,

As COM 0 does not exist the number in the above execute statement is off by 1. Thus for the COM port that you want you will need to subtract one and then place the number in the above code.

Thus
0 = COM 1
1 = COM 2
2 = COM 3
3 = COM 4
4 = COM 5
5 = COM 6
etc.

Try using 4 in the above code.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index