Initial working Telegram bot, LDR and LED
This commit is contained in:
16
Arduino/LDRtest/LDRtest.ino
Normal file
16
Arduino/LDRtest/LDRtest.ino
Normal file
@ -0,0 +1,16 @@
|
||||
/* LDR test measuring with A0 in middle of 10k Ohm resistor and LDR
|
||||
* +5V ---[ LDR ]---+---[ Resistor ]--- GND
|
||||
|
|
||||
Analog A0
|
||||
*/
|
||||
|
||||
void setup() {
|
||||
Serial.begin(9600);
|
||||
}
|
||||
|
||||
void loop() {
|
||||
int value = analogRead(A0); // Reads value between 0 and 1023
|
||||
Serial.println(value);
|
||||
delay(500);
|
||||
}
|
||||
|
Reference in New Issue
Block a user