Ks0244 keyestudio EASY plug TEMT6000 Ambient Light Sensor: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 23: Line 23:
<br>
<br>
==Connect It Up==
==Connect It Up==
Connect the EASY Plug TEMT6000 sensor to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
Connect the EASY Plug TEMT6000 sensor and an LED module to control board using an RJ11 cable. <br>
<br>[[File:KS0244-1.jpg|500px|frameless|thumb]]<br>
Then connect the control board to your PC with a USB cable.
<br>[[File:环境光灯.jpg|500px|frameless|thumb]]<br>
 
<br>
<br>
==Upload the Code==
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<br>[[File:ks0398 15.1.png|500px|frameless|thumb]]<br>


==Sample Code==
<br>
Copy and paste below code to [http://wiki.keyestudio.com/index.php/How_to_Download_Arduino_IDE Arduino IDE] and upload.
==What You Should See==
<br>[[File:ks0398 15-1.png|500px|frameless|thumb]]<br>
<br>
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. <br>
When the sensor detects different light intensity, the brightness of LED will change.<br>
<br>[[File:ks0398 15-2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15-3.png|500px|frameless|thumb]]<br>


<pre>
<br>
int temt6000Pin = 0;
==Controlling RGB Flash==
void setup() {
<br>
Serial.begin(9600);
'''Hookup Guide'''<br>
}
<br>[[File:环境光RGB.jpg|500px|frameless|thumb]]<br>
void loop() {
int value = analogRead(temt6000Pin);
Serial.println(value);
delay(100); //slow down the output speed so that read the value easily
}
</pre>


<br>
<br>
==What You Should See==
'''Test Code'''<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the analog value. When the sensor detects different light intensity, the value will change.
<br>[[File:ks0398 15.2.png|500px|frameless|thumb]]<br>
<br>[[File:ks0244 Result.png|600px|frameless|thumb]]<br>


<br>
<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>
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>
<br>[[File:ks0398 15-4.png|500px|frameless|thumb]]<br>
<br>[[File:ks0398 15-5.png|500px|frameless|thumb]]<br>


<br>
<br>
==Resources ==
==Resources ==
'''Download the PDF:'''<br>
'''Download the Arduino Code and PDF:'''<br>
https://drive.google.com/open?id=10Rl5goHtGDDgwA_SoSVkHfYicOo77pPz
https://drive.google.com/open?id=12va95SBPBX_-k17FvwU5IZrA3hiw6Z3T


'''Download the Code:'''<br>
'''Download the Mixly Code and Datasheet:'''<br>
https://drive.google.com/open?id=1cQTpselgjTvlBotJv39kT7G_kDTDD5-P
https://drive.google.com/open?id=139oWsbx1OGCsxZEEL_Nk4A4cd952cv56




<br>
<br>
==Buy from ==
==Buy from ==
*'''Official Website:''' http://www.keyestudio.com/ks0244.html
*[https://www.keyestudio.com/keyestudio-easy-plug-temt6000-ambient-light-sensor-module-for-arduino-interface-type-rj11-p0461-p0461.html '''Official Website''']


*[https://www.aliexpress.com/store/product/Keyestudio-EASY-plug-TEMT6000-Ambient-light-sensor-module-for-arduino-Interface-Type-RJ11/1452162_32819765092.html?spm=2114.12010612.8148356.72.60624ba7tvibrt  Shop on aliexpress  ]
*[https://www.aliexpress.com/store/product/Keyestudio-EASY-plug-TEMT6000-Ambient-light-sensor-module-for-arduino-Interface-Type-RJ11/1452162_32819765092.html?spm=2114.12010612.8148356.72.60624ba7tvibrt  Shop on aliexpress  ]

Revision as of 14:38, 8 May 2019

EASY plug TEMT6000 Ambient Light Sensor

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.
thumb


Upload the Code

Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See


thumb

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.

thumb

thumb


Controlling RGB Flash


Hookup Guide

thumb


Test Code

thumb


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.

thumb

thumb



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



Buy from