Mini Photocell (FIT0180) [S001]
https://www.youtube.com/watch?v=LAcLVWYBJbY
*GitHub : https://github.com/rdiot/rdiot-s001.git
* Specs
Head Diameter: 5mm
Voltage: 5V
Power Consumption: 70mW
Operating Temperature: -25~+85
Storage Temperature: -40~+100
Soldering Temperature: 260(<3s)
* Contents
- Connect
Short ----- 5V
Long ----- P10K ----- GND
- Key Code
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,20,4); // LCD2004
int sensorPin = A0;
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight();
lcd.print("start LCD2004");
}
void loop()
{
int rate = analogRead(sensorPin);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("S001:FIT0180");
lcd.setCursor(0,1);
lcd.print("CDS Value=" + (String)rate);
delay(200);
}
'2) Sensor > CDS_Photocell' 카테고리의 다른 글
Load CDS sensor type values into DB by calling server API [P001] (0) | 2016.09.08 |
---|---|
Auto On Off Photo Switch (AS-10-220) [S157] (0) | 2016.09.08 |
BH1750 Digital Light intensity Sensor Module (GY-302) [S085] (0) | 2016.09.08 |
Photo Resistor Module (KY-018) [S002] (0) | 2016.09.08 |
CDS5MM~CDS20MM Value [S003~S006] (0) | 2016.09.08 |