15 lines
250 B
Arduino
15 lines
250 B
Arduino
|
|
const int pin_lux_0 = A1;
|
||
|
|
const int ADC_AVG_RES = 4;
|
||
|
|
|
||
|
|
void setup() {
|
||
|
|
analogReadAveraging(ADC_AVG_RES);
|
||
|
|
Serial.begin(115200);
|
||
|
|
pinMode(pin_lux_0, INPUT);
|
||
|
|
}
|
||
|
|
|
||
|
|
void loop() {
|
||
|
|
int l = analogRead(pin_lux_0);
|
||
|
|
Serial.println(l);
|
||
|
|
delay(50);
|
||
|
|
}
|