Rangefinder

Functions for using the IR rangefinders. More...

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.

Detailed Description

Functions for using the IR rangefinders.

Functions for using the IR rangefinders.


Function Documentation

void range_init void   ) 
 

Initialize the rangefinders.

Initializes the rangefinders. This must be called before range_read_distance.

See also:
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.

Parameters:
range_id the rangefinder to use. This should be one of the constants IR1 - IR5.
Returns:
the distance measured by the rangefinder
See also:
range_init


Generated on Fri Sep 14 15:36:18 2007 for libdragonfly by  doxygen 1.4.6