ข้อมูล
น้ำหนัก
บาร์โค้ด
ลงสินค้า
อัพเดทล่าสุด
รายละเอียดสินค้า

TEMT6000 ambient light sensor analog light intensity module visible light sensor

Description

TEMT6000 is a silicon NPN epitaxial planar phototransistor

in a miniature transparent mold for surface

mounting onto a printed circuit board. The device

is sensitive to the visible spectrum.

Features

• Adapted to human eye responsivity

• Wide angle of half sensitivity ϕ = ± 60°

• SMD style package on PCB technology

• Suitable for IR reflow soldering

• Lead free component

• Component in accordance to RoHS 2002/95/EC

 
Code: 

 /*  

    Arduino with Test Ambient light sensor TEMT6000

   

    For complete project details, visit:Arduinoshop99

*/

#include "Wire.h"

#include "Adafruit_GFX.h"

#include "Adafruit_SSD1306.h"

#include "Fonts/FreeMono9pt7b.h"  //include font FreeMono9pt7b.h

Adafruit_SSD1306 OLED(-1); 

#define light A0 // define input pin

 

void setup() {

   Serial.begin(9600);

 OLED.setFont(&FreeMono9pt7b); // Use font from file include   

  OLED.begin(SSD1306_SWITCHCAPVCC,0x3C); // initialize with the I2C addr 0x3C (for the 128x64)

}

void loop(){

   int Lvalue = analogRead(light);// read the light

  int mVolt = map(Lvalue,0, 1023, 0, 5000);// map analogue reading to 5000mV

  float volt =(double)mVolt/1000;// convert millivolt to volt

 

  Serial.print(mVolt);// print millivolt

  Serial.print( "mV ");

  Serial.print(volt,3);// print volts with 3 decimal places

  Serial.println( "V ");

  delay(1000);// wait for 1000 milliseconds

 

  

  OLED.clearDisplay(); 

  OLED.setTextColor(WHITE);   //Text is white ,background is black

  OLED.setTextSize(1);

  OLED.setCursor(0,10);

  OLED.println("Light");

   OLED.setCursor(0,25);

   OLED.setTextSize(0);

  OLED.println("intensity");

  OLED.setTextSize(1);

  OLED.drawLine(0, 30, 127,30, WHITE);

  OLED.setCursor(10,45);

  OLED.println(mVolt);

  OLED.setCursor(70,45);    

 OLED.println("mv");

 

OLED.setCursor(10,60);

  OLED.println(volt,3);

  OLED.setCursor(70,60);    

 OLED.println("Volt");

    OLED.drawLine(0, 63, 127,63, WHITE);

  

  OLED.display(); //

  delay(200); 

}


 

เงื่อนไขอื่นๆ
Tags

วิธีการชำระเงิน

บมจ. ธนาคารกรุงไทย สาขาโรงไฟฟ้าบางปะกง ออมทรัพย์
ธนาคารกรุงเทพ จำกัด (มหาชน) สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
บมจ. ธนาคารกรุงไทย สาขาบิ๊กซี ฉะเชิงเทรา 2 ออมทรัพย์
พร้อมเพย์ สาขา- -
Scan this!
สนธยา ใจผ่อง
063-xxxxxx-8
Accept All Banks | รับเงินได้จากทุกธนาคาร
พูดคุย-สอบถาม