admin
|
We received this support email about the 'M' command ... >I tried to control the SRV-1 using the protocol commands. In order to >test the behaviour of the robot, i connected via telnet and typed the >M-Command 'M323200'. According to the documentation, the robot should >go forward indefinitely with 50% speed on each side. But in reality, >it only drives for approx. 100ms. All other commands are fine. > >What's wrong with my M-command? The 'M' command is different from most of the other commands, in that it is designed for control by an 8-bit binary interface rather than 7-bit ASCII terminal control. So the SRV-1 recognized the M, then processed the '3' as 0x33, the '2' as 0x32, and the '3' as 0x33, and ignored the remaining characters. The first '3' and '2' would produce left/right motor of 51% and 50% respectively (0x33 converts to 51 decimal, and 0x32 converts to 50 decimal), but the final '3' should produce a delay of 0x33 or 51 * 10 milliseconds = 0.51 seconds. What you're looking for is an ASCII character that would generate a binary pattern of 0x00, but I don't think that's possible from the keyboard - control-@ might be the right character. The largest delay you might get would come from the '~' character with a binary pattern of 0x7E, which would give you a delay of 1.26 seconds. As a side note, you can see how all of the commands are represented as hex characters in SRV1Console's srv.config. You can modify the default settings of the keys in this file. Negative values are 2's complement format, so -1 is represented as FF, -32 as E0, -50 as CE, etc.
|