TEMT6000X01 ambient light sensor is a silicon NPN epitaxial planar phototransistor in a miniature transparent 1206 package for surface mounting. It is sensitive to visible light much like the human eye and has peak sensitivity at 570 nm.
Here is a picture of a module
Here is a schematic of the module, basically the sensor acts like a transistor the greater the light present, the higher the analog voltage on the signal pin. So easy to read this with a Wemos Mini
APPLICATIONS
Ambient light sensor for control of display backlight dimming in LCD displays and keypad backlighting of mobile devices and in industrial on/off-lighting operation.
• Automotive sensors
• Mobile phones
• Notebook computers
• PDA’s
• Cameras
• Dashboards
Connection
Code
This is very basic, you would need to have some sort of value that you would try and detect, either too dark or light
[codesyntax lang=”cpp”]
#define LIGHTSENSORPIN A0 //Ambient light sensor reading
void setup()
{
pinMode(LIGHTSENSORPIN, INPUT);
Serial.begin(9600);
}
void loop()
{
float reading = analogRead(LIGHTSENSORPIN); //Read light level
Serial.println(reading);
delay(1000);
}
[/codesyntax]
Output
Open the serial monitor and you should see something like this depending on how muck light is shining on the sensor
39.00
41.00
42.00
43.00
412.00
1024.00
1024.00
1024.00
1024.00
189.00
402.00
388.00
Links
https://www.vishay.com/docs/81579/temt6000.pdf