Defines | |
#define | IR1 6 |
IR Rangefinder 1. | |
#define | IR2 5 |
IR Rangefinder 2. | |
#define | IR3 4 |
IR Rangefinder 3. | |
#define | IR4 3 |
IR Rangefinder 4. | |
#define | IR5 2 |
IR Rangefinder 5. | |
Functions | |
void | range_init (void) |
Initialize the rangefinders. | |
int | range_read_distance (int range_id) |
Read the distance from a rangefinder. |
Functions for using the IR rangefinders.
void range_init | ( | void | ) |
Initialize the rangefinders.
Initializes the rangefinders. This must be called before range_read_distance.
int range_read_distance | ( | int | range_id | ) |
Read the distance from a rangefinder.
Reads the distance measured by one of the rangefinders. This distance is in arbitrary units.
range_id | the rangefinder to use. This should be one of the constants IR1 - IR5. |