From f366f9f9c0bb3acb150ca49a1f9e8ee6d569fcf3 Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 6 Sep 2023 16:31:52 +0200 Subject: [PATCH] arduino light test --- .../licht-test/sketch_sep6a/sketch_sep6a.ino | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 arduino/licht-test/sketch_sep6a/sketch_sep6a.ino diff --git a/arduino/licht-test/sketch_sep6a/sketch_sep6a.ino b/arduino/licht-test/sketch_sep6a/sketch_sep6a.ino new file mode 100644 index 0000000..d7bbf84 --- /dev/null +++ b/arduino/licht-test/sketch_sep6a/sketch_sep6a.ino @@ -0,0 +1,20 @@ +/* + * Created by ArduinoGetStarted.com + * + * This example code is in the public domain + * + * Tutorial page: https://arduinogetstarted.com/tutorials/arduino-light-sensor + */ +#define LDR 5 +void setup() { + // initialize serial communication at 9600 bits per second: + Serial.begin(9600); +} + +void loop() { + // reads the input on analog pin A0 (value between 0 and 1023) + int analogValue = analogRead(LDR); + + Serial.println("Analog reading: "); + Serial.println(analogValue); // the raw analog reading +} \ No newline at end of file