roneos
Operating System for the r-one robot
 All Data Structures Files Functions Variables Typedefs Groups
light_sensor.h File Reference

Interface to initialize and read light sensor ring on robot. More...

Go to the source code of this file.

Functions

void lightSensorInit (void)
 Initializes light sensor. More...
 
int32 lightSensorGetValue (uint32 light_sensor)
 Gets the ADC value of the specified light sensor. More...
 

Detailed Description

Interface to initialize and read light sensor ring on robot.

Since
July 22, 2010
Author
James McLurkin

Function Documentation

int32 lightSensorGetValue ( uint32  light_sensor)

Gets the ADC value of the specified light sensor.

If the input light sensor is not recognized, returns 0

Parameters
light_sensorspecifies which light sensor you want to check. Only {0, 1, 2} are allowed on v11 robots and {0, 1, 2, 3} allowed on v12 robots
Returns
the ADC value; 0 if the input parameter is not recognized. Note that for calibrated robots, this value can be negative, i.e. less that the calibration conditions.
void lightSensorInit ( void  )

Initializes light sensor.

Sets sampling speed and configures and enables the light sensor.

Returns
void