Motorcontroller-Firmware
From Nibo
(Difference between revisions)
(→Odometriestecker) |
|||
| Line 2: | Line 2: | ||
==Write== | ==Write== | ||
| - | == | + | ==Kommandos== |
| - | + | Die folgenden Kommandos können über die TWI Schnittstelle zum Motorcontroller geschickt werden. | |
{| border="1" | {| border="1" | ||
! Kommando !! Größe !! Byte0 !! Byte1 !! Byte2 !! Byte3 !! Byte4 | ! Kommando !! Größe !! Byte0 !! Byte1 !! Byte2 !! Byte3 !! Byte4 | ||
|- | |- | ||
| - | !Stop | + | !Stop !! 1 !! 0x00 !! - !! - !! - !! - |
|- | |- | ||
| - | !SetPWM | + | !SetPWM !! 5 !! 0x01 |
| - | | | + | | colspan="2" | PWM links |
| + | | colspan="2" | PWM rechts | ||
|- | |- | ||
| - | !SetSpeed | + | !SetSpeed !! 5 !! 0x02 |
| - | | | + | | colspan="2" | Soll links |
| + | | colspan="2" | Soll rechts | ||
|- | |- | ||
| - | !SetParameters | + | !SetParameters !! 4 !! 0x03 !! Ki !! Kp !! Kd !! - |
| - | + | ||
|- | |- | ||
| - | !ResetOdometry | + | !ResetOdometry !! 5 !! 0x04 |
| - | | | + | | colspan="2" | Odo links |
| + | | colspan="2" | Odo rechts | ||
| + | |} | ||
| + | |||
| + | ==Zustand== | ||
| + | Das folgende Datenpaket kann über die TWI Schnittstelle vom Motorcontroller abgefragt werden und beschreibt den aktuellen Zustand: | ||
| + | {| border="1" | ||
| + | ! Größe !! Byte0 !! Byte1 !! Byte2 !! Byte3 !! Byte4 !! Byte5 !! Byte6 !! Byte7 | ||
| + | |- | ||
| + | ! 8 | ||
| + | | colspan="2" | Odo links | ||
| + | | colspan="2" | Odo rechts | ||
| + | | colspan="2" | Geschw. links | ||
| + | | colspan="2" | Geschw. rechts | ||
|} | |} | ||
Revision as of 07:54, 2 July 2007
Write
Kommandos
Die folgenden Kommandos können über die TWI Schnittstelle zum Motorcontroller geschickt werden.
| Kommando | Größe | Byte0 | Byte1 | Byte2 | Byte3 | Byte4 |
|---|---|---|---|---|---|---|
| Stop | 1 | 0x00 | - | - | - | - |
| SetPWM | 5 | 0x01 | PWM links | PWM rechts | ||
| SetSpeed | 5 | 0x02 | Soll links | Soll rechts | ||
| SetParameters | 4 | 0x03 | Ki | Kp | Kd | - |
| ResetOdometry | 5 | 0x04 | Odo links | Odo rechts | ||
Zustand
Das folgende Datenpaket kann über die TWI Schnittstelle vom Motorcontroller abgefragt werden und beschreibt den aktuellen Zustand:
| Größe | Byte0 | Byte1 | Byte2 | Byte3 | Byte4 | Byte5 | Byte6 | Byte7 |
|---|---|---|---|---|---|---|---|---|
| 8 | Odo links | Odo rechts | Geschw. links | Geschw. rechts | ||||
