renamed files and folders
This commit is contained in:
24
arduino/LDR test/sketch_sep6a/LDR.ino
Normal file
24
arduino/LDR test/sketch_sep6a/LDR.ino
Normal file
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Created by ArduinoGetStarted.com
|
||||
*
|
||||
* This example code is in the public domain
|
||||
*
|
||||
* Tutorial page: https://arduinogetstarted.com/tutorials/arduino-light-sensor
|
||||
*/
|
||||
|
||||
//zegt dat het variable LDR wijst naar pin 12
|
||||
#define LDR 12
|
||||
void setup() {
|
||||
// initialize serial communication at 9600 bits per second:
|
||||
Serial.begin(9600);
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
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
|
||||
delay(1000);
|
||||
}
|
Reference in New Issue
Block a user