Ks0244 keyestudio EASY plug TEMT6000 Ambient Light Sensor: Difference between revisions
Keyestudio (talk | contribs) No edit summary |
Keyestudio (talk | contribs) |
||
Line 44: | Line 44: | ||
==Controlling RGB Flash== | ==Controlling RGB Flash== | ||
<br> | <br> | ||
'''Hookup Guide'''<br> | '''Hookup Guide:'''<br> | ||
<br>[[File:环境光RGB.jpg|500px|frameless|thumb]]<br> | <br>[[File:环境光RGB.jpg|500px|frameless|thumb]]<br> | ||
<br> | <br> | ||
'''Test Code'''<br> | '''Test Code:'''<br> | ||
<br>[[File:ks0398 15.2.png| | <br>[[File:ks0398 15.2.png|600px|frameless|thumb]]<br> | ||
<br> | <br> | ||
'''What You Should See'''<br> | '''What You Should See:'''<br> | ||
Upload the code successfully, when the measured light intensity is less than 50, RGB lights are turned on. <br> | Upload the code successfully, when the measured light intensity is less than 50, RGB lights are turned on. <br> | ||
Light 1 flashes in red, light 2 flashes in green, light 3 flashes in blue, light 4 flashes in white, with a delay time 500ms. <br> | Light 1 flashes in red, light 2 flashes in green, light 3 flashes in blue, light 4 flashes in white, with a delay time 500ms. <br> | ||
Line 60: | Line 60: | ||
<br> | <br> | ||
<br> | <br> | ||
==Resources == | ==Resources == | ||
'''Download the Arduino Code and PDF:'''<br> | '''Download the Arduino Code and PDF:'''<br> |
Revision as of 14:39, 8 May 2019
Introduction
Light sensors are probably one of the most common sensors in life. They can be found in your laptop, phone or home lighting system.
A light sensor measures the level of light in a room or ambient light in a space.
This EASY plug TEMT6000 light sensor uses a special ambient light detector (TEMT6000) with spectral response that closely emulates the human eye.
It does react well to very small changes in a wide range of brightness, however, it does not react well to IR or UV light. The sensor can help you to to detect the light density.
Note: this module should be used together with EASY plug control board.
Specification
- Connector: Easy plug
- Supply Voltage: +5V DC 50mA
- Interface:Analog Input
- Near Human Eye Spectral Response and Very Low IR Sensitivity
Technical Details
- Dimensions: 30mm*20mm*18mm
- Weight: 3.5g
Connect It Up
Connect the EASY Plug TEMT6000 sensor and an LED module to control board using an RJ11 cable.
Then connect the control board to your PC with a USB cable.
Upload the Code
Below is an example code. Open or drag below code to Mixly Blocks and upload.
What You Should See
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the printed analog value.
When the sensor detects different light intensity, the brightness of LED will change.
Controlling RGB Flash
What You Should See:
Upload the code successfully, when the measured light intensity is less than 50, RGB lights are turned on.
Light 1 flashes in red, light 2 flashes in green, light 3 flashes in blue, light 4 flashes in white, with a delay time 500ms.
Resources
Download the Arduino Code and PDF:
https://drive.google.com/open?id=12va95SBPBX_-k17FvwU5IZrA3hiw6Z3T
Download the Mixly Code and Datasheet:
https://drive.google.com/open?id=139oWsbx1OGCsxZEEL_Nk4A4cd952cv56