|
Files | |
file | hitechnic-irrecv.h |
HiTechnic IR Receiver Sensor driver. | |
Defines | |
#define | HTIRR_I2C_ADDR 0x02 |
#define | HTIRR_OFFSET 0x42 |
#define | HTIRR_MOTOR_1A 0x00 |
#define | HTIRR_MOTOR_1B 0x01 |
#define | HTIRR_MOTOR_2A 0x02 |
#define | HTIRR_MOTOR_2B 0x03 |
#define | HTIRR_MOTOR_3A 0x04 |
#define | HTIRR_MOTOR_3B 0x05 |
#define | HTIRR_MOTOR_4A 0x06 |
#define | HTIRR_MOTOR_4B 0x07 |
#define | MOTOR_BRAKE -128 |
Functions | |
bool | HTIRRreadChannel (tSensors link, byte channel, sbyte &motA, sbyte &motB) |
bool | HTIRRreadAllChannels (tSensors link, tsByteArray &motorSpeeds) |
Variables | |
tByteArray | HTIRR_I2CRequest |
tByteArray | HTIRR_I2CReply |
HiTechnic IR Receiver Sensor
#define HTIRR_I2C_ADDR 0x02 |
HTIRR I2C device address
Definition at line 42 of file hitechnic-irrecv.h.
#define HTIRR_MOTOR_1A 0x00 |
Color number
Definition at line 46 of file hitechnic-irrecv.h.
#define HTIRR_MOTOR_1B 0x01 |
Color number
Definition at line 47 of file hitechnic-irrecv.h.
#define HTIRR_MOTOR_2A 0x02 |
Color number
Definition at line 48 of file hitechnic-irrecv.h.
#define HTIRR_MOTOR_2B 0x03 |
Color number
Definition at line 49 of file hitechnic-irrecv.h.
#define HTIRR_MOTOR_3A 0x04 |
Color number
Definition at line 50 of file hitechnic-irrecv.h.
#define HTIRR_MOTOR_3B 0x05 |
Color number
Definition at line 51 of file hitechnic-irrecv.h.
#define HTIRR_MOTOR_4A 0x06 |
Color number
Definition at line 52 of file hitechnic-irrecv.h.
#define HTIRR_MOTOR_4B 0x07 |
Color number
Definition at line 53 of file hitechnic-irrecv.h.
#define HTIRR_OFFSET 0x42 |
Offset for data registers
Definition at line 43 of file hitechnic-irrecv.h.
#define MOTOR_BRAKE -128 |
Some define. Motor brake
Definition at line 56 of file hitechnic-irrecv.h.
bool HTIRRreadAllChannels | ( | tSensors | link, |
tsByteArray & | motorSpeeds | ||
) |
Get the speeds of the motors for all channels.
link | the HTIRR port number |
motorSpeeds | the speeds for all the motors (-100 to +100, -128 = brake) |
Definition at line 99 of file hitechnic-irrecv.h.
bool HTIRRreadChannel | ( | tSensors | link, |
byte | channel, | ||
sbyte & | motA, | ||
sbyte & | motB | ||
) |
Get the speeds of the motors for a given channel.
link | the HTIRR port number |
channel | the channel number (1 to 4) |
motA | the speed for Motor A (-100 to +100, -128 = brake) |
motB | the speed for Motor B (-100 to +100, -128 = brake) |
Definition at line 76 of file hitechnic-irrecv.h.
Array to hold I2C reply data
Definition at line 65 of file hitechnic-irrecv.h.
Array to hold I2C command data
Definition at line 64 of file hitechnic-irrecv.h.