Ky 018 Photosensitive Resistor Sensor Module For Arduino
Rs. 14.00 Rs. 17.00
- Product Code: SEN-LDR
- SKU -
- Availability: In Stock
- For Bulk Order 9962060070
Quick support on WhatsApp (+919962060070) only between morning 11am-4pm, no call will be answered
SPECIFICATIONS: | |
Resistance of the photoresistor(in full light) | less than 80 Ohms |
Dark resistance(in full darkness) | > 20MΩ |
Weight(g) | 4 |
Shipment Weight | 0.01 kg |
Shipment Dimensions | 3 × 2 × 1 cm |
OVERVIEW:
-This is a High-quality photosensitive sensor module/light module detects the photosensitive resistor for Arduino
-Resistance of the photoresistor is typically less than 80 Ohms (in full light)
-Dark resistance is typically greater than 20 Meg Ohms (in full darkness)
PACKAGE INCLUDES:
1 PCS x Ky 018 Photosensitive Resistor Sensor Module
//SOURCE CODE TAKEN FROM BELOW LINK
//https://create.arduino.cc/projecthub/vandenbrande/arduino-photo-resistor-example-ky-018-4d2724
/*
Author: Danny van den Brande, Arduinosensors.nl. BlueCore Tech.
In this example we use the Photoresistor as a switch.
Its just some basic code, you can adjust the value at the if statement between 0 and 1023.
*/
int Relay = 2;
int BlueLed = 3;
int Sensor = A0;
int sensorValue;
void setup() {
pinMode(BlueLed, OUTPUT);
pinMode(Relay, OUTPUT);
pinMode(Sensor, INPUT);
Serial.begin(9600);
}
void loop() {
sensorValue = analogRead(Sensor);
if(analogRead(1)>200 && analogRead(1)< 1023)
{
digitalWrite (BlueLed, LOW);
digitalWrite (Relay, LOW);
Serial.println(sensorValue, DEC);
}
else
{
digitalWrite (BlueLed, HIGH);
digitalWrite (Relay, HIGH);
Serial.println(sensorValue, DEC);
}
}
15 days