Skip to content

Commit 8a1df9a

Browse files
authored
Update usermod_sn_photoresistor.h
Allow to configure the analog input pin for the Photoresistor.
1 parent 25ade86 commit 8a1df9a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

usermods/SN_Photoresistor/usermod_sn_photoresistor.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
#include "wled.h"
44

55
//Pin defaults for QuinLed Dig-Uno (A0)
6+
#ifndef PHOTORESISTOR_PIN
67
#define PHOTORESISTOR_PIN A0
8+
#endif
79

810
// the frequency to check photoresistor, 10 seconds
911
#ifndef USERMOD_SN_PHOTORESISTOR_MEASUREMENT_INTERVAL
@@ -207,4 +209,4 @@ const char Usermod_SN_Photoresistor::_readInterval[] PROGMEM = "read-interval-s"
207209
const char Usermod_SN_Photoresistor::_referenceVoltage[] PROGMEM = "supplied-voltage";
208210
const char Usermod_SN_Photoresistor::_resistorValue[] PROGMEM = "resistor-value";
209211
const char Usermod_SN_Photoresistor::_adcPrecision[] PROGMEM = "adc-precision";
210-
const char Usermod_SN_Photoresistor::_offset[] PROGMEM = "offset";
212+
const char Usermod_SN_Photoresistor::_offset[] PROGMEM = "offset";

0 commit comments

Comments
 (0)