Teraterm commands
The first character of the response gives you information about the status of the controller it can be one three possible characters: Status character
#TERATERM COMMANDS SERIAL#
ResponsesĪny ASCII mode command string that contains more than just a termination character will generate a serial response from the Simple Motor Controller. One of the above three characters must be the last character in your ASCII command string.
In C, the string “abc” is comprised of the four characters: ‘a’, ‘b’, ‘c’, and. It is often written as and has a character value of 0.
It is often written as and has a character value of 13.
#TERATERM COMMANDS FULL#
For example, you can represent full motor speed with the argument “3200” or with the argument “100%”. The arguments to the three motor commands (“F”, “R”, and “B”) can also be written as percentages by appending a “%” to the end of the argument. For example, you can represent an argument value of 127 with “127” or “7FH” (0x7F is the hex representation of 127). By default, the string is interpreted as a decimal (base 10) value, but an “H” can be appended to the end of the string to tell the Simple Motor Controller G2 to interpret it as a hexadecimal (base 16, or hex) value. The following table lists all of the available command strings: Command stringĬommand arguments are expressed as strings of ASCII digits. The specific commands are documented in Section 6.3.1. ĪSCII commands are case-insensitive and white-space is ignored, so “F3200” has the same effect as “f 3200 ”. Here the command string is “F”, the argument string is “3200”, and the termination character is. All commands must be terminated by a special termination character, such as a carriage return ().Įxpressed generally, the format is: command string + ] + termination characterįor example, to command the motor to drive forward at speed 3200 (full speed), we could send the following ASCII command: Not all commands take arguments, and only one command (Set motor limit) takes multiple arguments.
The commands are longer than their binary mode Compact Protocol counterparts, so they will take longer to send.There are some limitations when using ASCII mode, however: This mode makes it easy to interact with the Simple Motor Controller G2 through a terminal program, such as Tera Term, and it can provide a more intuitive interface for users who would rather deal with character strings than bits and bytes. When configured in “ASCII” serial mode, the Simple Motor Controller G2 TTL serial port and USB virtual serial port offer a simple serial interface based on ASCII characters.