Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 2a05b25

Browse files
Added IR Sensor Read File
1 parent bb521ae commit 2a05b25

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ir_sensor_read/ir_sensor_read.ino

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
int sensorPin = A0; // select the input pin for LDR
2+
3+
int sensorValue = 0; // variable to store the value coming from the sensor
4+
void setup() {
5+
Serial.begin(9600); //sets serial port for communication
6+
}
7+
void loop() {
8+
sensorValue = analogRead(sensorPin); // read the value from the sensor
9+
Serial.println(sensorValue); //prints the values coming from the sensor on the screen
10+
11+
delay(100);
12+
13+
}

0 commit comments

Comments
 (0)