KY-018 Photo resistor module

1.85$

Description

Module Features:

1, Using sensitive photosensitive resistance sensor

2,The comparator output signal is clean, good waveform, driving ability, more than 15mA.

3, With adjustable potentiometer to adjust the brightness of the light detection

4,The working voltage 3.3V-5V

5,The output form: DO digital switching outputs (0 and 1) and AO analog voltage output

6,A fixed bolt holes for easy installation

7, PCB Size: 3.2cm x 1.4cm

8, Using a wide voltage LM393 comparator


Product wiring instructions:
1, VCC positive power supply 3.3-5V
2, GND power supply is negative
3, DO TTL switching signal output
4, AO analog output

//KY018 Photo resistor module

int sensorPin = A5; // select the input pin for the potentiometer
int ledPin = 13; // select the pin for the LED
int sensorValue = 0; // variable to store the value coming from the sensor

void setup() {
  pinMode(ledPin, OUTPUT);
  Serial.begin(9600);
}

void loop() {
  sensorValue = analogRead(sensorPin);
  digitalWrite(ledPin, HIGH);
  delay(sensorValue);
  digitalWrite(ledPin, LOW);
  delay(sensorValue);
  Serial.println(sensorValue, DEC);
}  

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.