![]() |
Serial Wombat 18AB Firmware
|
Classes | |
struct | linear_n |
struct | lookup2D_n |
struct | pulseIn_n |
Typedefs | |
typedef struct linear_n | linear_t |
typedef struct lookup2D_n | lookup2D_t |
typedef struct pulseIn_n | pulseOut_t |
Enumerations | |
enum | transformType_t { TRANSFORM_TYPE_DIRECT = 0, TRANSFORM_TYPE_LINEAR = 1 } |
Functions | |
void | initPulseIn (void) |
void | updatePulseIn (void) |
typedef struct lookup2D_n lookup2D_t |
typedef struct pulseIn_n pulseOut_t |
enum transformType_t |
void initPulseIn | ( | void | ) |
\brief Initialization routine for Servo.
Initialize Servo. This command causes the pulse width to default to 500uS to 2500uS.
BYTE 0 | BYTE 1 | BYTE 2 | BYTE 3 | BYTE 4 | BYTE 5 | BYTE 6 | BYTE 7 |
---|---|---|---|---|---|---|---|
0xC0 | Pin To Set | 0x03 (servo mode) | Pin To Set (Required for compatability with SW19) | Position Value Low Byte | Position Value High Byte | 0x00 or 0x01 (Normal or Reverse) | 0x55* |
*0x55 is recommended, but any byte is acceptable
Response:
Command is echoed back.
Examples:
Set pin 2 to Servo, Position 0x4080, no reverse
0xC0 0x02 0x03 0x02 0x80 0x40 0x00 0x55
Set Pulse widths. This command must come after a servo CONFIGURE_CHANNEL_MODE_0 command for the same pin. Units are microseconds
BYTE 0 | BYTE 1 | BYTE 2 | BYTE 3 | BYTE 4 | BYTE 5 | BYTE 6 | BYTE 7 |
---|---|---|---|---|---|---|---|
0xC1 | Pin To Set | 0x03 (servo mode) | Fixed pulse time low byte | Fixed pulse time high byte | Variable pulse time low byte | variable pulse time high byte | 0x55* |
*0x55 is recommended, but any byte is acceptable
Response:
Command is echoed back.
Examples:
Set pin 2 Servo Pulse width to range between 750 and 1750 uS.
Fixed period is 750 = 0x02EE, variable period is (1750 - 750) = 1000 = 0x03E8
0xC1 0x02 0x03 0xEE 0x02 0xE8 0x03 0x55
void updatePulseIn | ( | void | ) |