Take advantage of the light sensor available on your smartphone to trigger a hardware actions. Learn more from the examples page.
This shield is one of the sensor shields. Sensor shields allows you to tap into your smartphone’s sensors and use in prototyping with Arduino, you can get information from the surrounding environment and use
it to trigger a certain action. Learn more from the sensor shields tutorial.
Light sensors ”Photodetectors” measures the ambient light level in Lux’s. Light sensor Library allows arduino to get sensed light data from the smartphone’s light sensor.
Adding #define CUSTOM_SETTINGS along with #define INCLUDE_LIGHT_SENSOR_SHIELD is a key that will let you unlock the Light sensor shield only amongst all shields and prevent 1Sheeld library from eating your memory specially for UNO board.
Get sensed light values from the light sensor from smartphone.
unsinged long value of data.
unsigned long value = LightSensor.getValue();
Sets a certain individual function written by the user in the sketch to be called and runs its functionality once a new value of light is sensed from light sensor.
&userFunctionName: takes the physical address of the userFunction in the memory and jump to it once called to execute it’s functionality.
/* myFunction exists under the loop function. */
/* This function will be invoked each time a new value is sensed by the light sensor. */
void myFunction (unsigned long lightValue)
/*Print out the light values on the Terminal of the application. */