#include <LightDetection.h>
Definition at line 44 of file LightDetection.h.
◆ begin()
void LightDetection::begin |
( |
void |
| ) |
|
|
static |
initialize the Lightdetection Compnent, must be called before the other methods are used.
Definition at line 4 of file LightDetection.cpp.
◆ beginDaylight()
void LightDetection::beginDaylight |
( |
void |
| ) |
|
|
staticprotected |
◆ beginInfrared()
void LightDetection::beginInfrared |
( |
void |
| ) |
|
|
staticprotected |
◆ getAverageValue()
uint32_t LightDetection::getAverageValue |
( |
photoTransistors |
sensor, |
|
|
uint32_t |
measurments, |
|
|
uint32_t |
timeBetween |
|
) |
| |
|
static |
Get the Average of multiple measurments of a single PT.
- Parameters
-
sensor | Which Phototransistor should be read |
measurments | how many measurements should be taken |
timeBetween | which time should elapse between |
- Returns
- the average of all taken meaurments
Definition at line 54 of file LightDetection.cpp.
◆ getBrightest()
can be used to determine which sensor is exposed to the greatest amount of light Can distingish between IR and Daylight
- Parameters
-
type | select which PTTransistors to compare |
- Returns
- photoTransistors which sensor is exposed to the greatest amount of light, if all sensor read 0, the front sensor is returned
Definition at line 26 of file LightDetection.cpp.
◆ getValue()
reads the Value of the specified sensor
- Parameters
-
sensor | which sensor to read |
- Returns
- uint the reading of the sensor. between 0-4095
Definition at line 9 of file LightDetection.cpp.
◆ readDLPT()
◆ readIRPT()
◆ DL_PT_BOTTOM_ADC
const uint8_t LightDetection::DL_PT_BOTTOM_ADC = 8 |
|
staticprotected |
◆ DL_PT_ENABLE
const uint8_t LightDetection::DL_PT_ENABLE = 41 |
|
staticprotected |
◆ DL_PT_FRONT_ADC
const uint8_t LightDetection::DL_PT_FRONT_ADC = 7 |
|
staticprotected |
◆ IR_PT_BACK_ADC
const uint8_t LightDetection::IR_PT_BACK_ADC = 6 |
|
staticprotected |
◆ IR_PT_ENABLE
const uint8_t LightDetection::IR_PT_ENABLE = 40 |
|
staticprotected |
◆ IR_PT_FRONT_ADC
const uint8_t LightDetection::IR_PT_FRONT_ADC = 3 |
|
staticprotected |
◆ IR_PT_LEFT_ADC
const uint8_t LightDetection::IR_PT_LEFT_ADC = 4 |
|
staticprotected |
◆ IR_PT_RIGHT_ADC
const uint8_t LightDetection::IR_PT_RIGHT_ADC = 5 |
|
staticprotected |
The documentation for this class was generated from the following files: