Mini Photocell (FIT0180) [S001]

 

 

https://www.youtube.com/watch?v=LAcLVWYBJbY


*GitHubhttps://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);
}

Posted by RDIoT
|