-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Poorna Chander Kalidas edited this page Jun 24, 2018
·
82 revisions
Welcome to the Motor_Controller_2.0 wiki!
| Command | Argument | Done? | Full Name | Function | Example | Returns | Return Description | Return Formula |
|---|---|---|---|---|---|---|---|---|
| MxFyy | 00-99 | Yes | Motor x Forward | Go Forward 0-99 on the throttle input | M5F02\n | |||
| MxRyy | 00-99 | Yes | Motor x Reverse | Go Reserve 0-99 on the throttle input | M3R45\n | |||
| MSAdyydyydyydyydyydyydyydyy | 00-99 | Yes | Motor Set All | Set all motors speed | MSAF45F12F31R32R10R15F20F25 | |||
| STP | N/A | Yes | Stop All | Stop all the motors regardless of anything | STP\n | ACK\r\n | ||
| SMx | N/A | Yes | Stop x | Stop motor x | SM2\n | ACK\r\n | ||
| RVx | N/A | Yes | Revolutions on motor x | Revolutions per second on motor x measured by the system | RV2\n | aaaaa\r\n | Number is formatted in ASCII | |
| RVA | N/A | Yes | Revolution per second on all motors | Revoultions per second on all motors given sequentially (same as: RV1, RV2, RV3) | RVA\n | ################\r\n | Every two numbers correspond to one motor starting at 1 going to 8 in LSB first | RPM1 = (x0 |(x1 << 8)) RPM8 = (x14 | (x15 << 8)) |
| PWxyyy | 000-999 | No | Pulse Width Modulate x | Set drive PWM dutycycle (Recommended to use MxF or MxR) | PW305\n | |||
| RID | N\A | Yes | Return ID | Returns the systems ID identifying what it is | RID\n | Motor Controller\r\n | ||
| TMP | N/A | Returns test value | Return Temperature | Returns the reading from the temperature sensor | TMP\n | ## | Returned bytes are LSB and unsigned | temperature = (x/10) - 273.15 |
| TMH | N/A | Returns test value | Return Temperature, output ASCII | Returns the reading from the temperature sensor in ASCII | TMH\n | saaa.a | Returned bytes are in ASCII. s is either a positive or negative sign depending on temperature | |
| HUM | N/A | Returns test value | Return Relative Humidity | Returns the humidity reading from the temperature sensor | HUM\n | # | Returned byte is LSB and unsigned. Should never be higher then 100 | RH = x |
| HUH | N/A | Returns test value | Return Relative Humidity, output ASCII | Returns the humidity reading from the temperature sensor in ASCII | HUH\n | aaa | Return bytes are in ASCII | |
| MCx | N/A | Yes | Motor Current x | Return motor current x | MC3 | aa.aaa | Current is returned in mA and is already in ASCII | |
| MCA | N/A | Yes | Get all motor currents | Return all motor current | MCA\n | ################\r\n | Current is returned in mA | MC1 = (x0 |(x1 << 8)) MC8 = (x14 | (x15 << 8)) |
| TMx | N/A | Yes | Motor Temperature x | Return motor temperature x | TM3\n | aaa.aaa | Current is returned in C and is already in ASCII. First character will be a plus or minus | |
| TMA | N/A | Yes | Get all motor temperatures | Return all motor temperatures | TMA\n | ################\r\n | Temperature is returned in 1/10 a degree kelvin. LSB order | Temperature Motor 1 = ((x0 |(x1 << 8))/10 - 273.15) Temperature Motor 8 = ((x14 | (x15 << 8))/10 -273.15) |
| SCH | N/A | Returns test value | Get system current, output in ascii | Return system current in human readable form | SCH\n | aaa.aaa | Current is returned in Amps and is already in ASCII | |
| SCM | N/A | Returns test value | Get system current in machine form | System current in machine format | SCM\n | ###\r\n | Current is returned in mA. LSB order | |
| WTR | N/A | Yes | Return Water Sensor | Returns the reading from water sensor | WTR\n | ##\r\n | Returns raw ADC values between 0 to 4095 | |
| WTH | N/A | Yes | Return Water Sensor in Human Readable Form | Returns the reading from water sensor in ascii | WTH\n | aaaaa\r\n | Returns values from 0 to 4095 | |
| PIM | N/A | Return test value | Return Internal Pressure | Returns the reading from the internal/main housing pressure sensor | PIN\n | ###\r\n | Pressure in millibar = RETURN_VALUE * 10^(-2) | |
| PIH | N/A | Returns test value | Return Internal Pressure, output in ASCII | Returns the reading from the internal/main housing pressure sensor | PIN\n | aaaaa.aa\r\n | Pressure in milliBar |
Note:
'x' = Motor number (1 - 8)
'y' = Argument (one byte)
'd' = Direction (F or R)
'#' = One byte
'a' = byte returned in ascii format