Engduino  3.1.0
A fun device for learning coding
Files | Classes | Functions | Variables
Driver for Engduino Light Sensor

Files

file  EngduinoLight.cpp
 
file  EngduinoLight.h
 

Classes

class  EngduinoLightClass
 

Functions

 EngduinoLightClass::EngduinoLightClass ()
 Constructor. More...
 
void EngduinoLightClass::begin ()
 begin function - must be called before using other functions More...
 
void EngduinoLightClass::end ()
 end function - switch off the light sensor More...
 
uint16_t EngduinoLightClass::lightLevel ()
 lightLevel function - returns light level (10 bit value) More...
 

Variables

EngduinoLightClass EngduinoLight = EngduinoLightClass()
 
EngduinoLightClass EngduinoLight
 

Detailed Description

This is the driver code for Light on the Engduino In v3.0 this light sensor is a Avago ADPS-9008.

Function Documentation

void EngduinoLightClass::begin ( )

begin function - must be called before using other functions

Does nothing in this case

void EngduinoLightClass::end ( )

end function - switch off the light sensor

Does nothing in this case

EngduinoLightClass::EngduinoLightClass ( )

Constructor.

C++ constructor for this class. Empty.

uint16_t EngduinoLightClass::lightLevel ( )

lightLevel function - returns light level (10 bit value)

This function returns the light level. Since the input is an analogue one and the ADC gives a 10 bit value, it returns a 16 bit integer.