Allow pins/settings to be defined in INI file (#597)
* Allow pins/settings to be defined in INI file * Open to make publishing ManufacturerData optional
This commit is contained in:
1 parent
470790b42e
commit
9fc5ba99f5
9 files changed
+90
-56
No files matched your search
+11
-3
@@ -31,10 +31,18 @@ extern void ADCtoMQTT();
|
||||
/*----------------------------USER PARAMETERS-----------------------------*/
|
||||
/*-------------DEFINE YOUR MQTT PARAMETERS BELOW----------------*/
|
||||
#define ADCTOPIC "/ADCtoMQTT"
|
||||
#define TimeBetweenReadingADC 500 // time between 2 ADC readings, minimum 200 to let the time of the ESP to keep the connection
|
||||
#define ThresholdReadingADC 50 // following the comparison between the previous value and the current one +- the threshold the value will be published or not
|
||||
|
||||
#if !defined(TimeBetweenReadingADC) || (TimeBetweenReadingADC < 200)
|
||||
#define TimeBetweenReadingADC 500 // time between 2 ADC readings, minimum 200 to let the time of the ESP to keep the connection
|
||||
#endif
|
||||
|
||||
#ifndef ThresholdReadingADC
|
||||
#define ThresholdReadingADC 50 // following the comparison between the previous value and the current one +- the threshold the value will be published or not
|
||||
#endif
|
||||
|
||||
/*-------------------PIN DEFINITIONS----------------------*/
|
||||
#define ADC_PIN A0 //on nodeMCU this is D3 GPIO0
|
||||
#if defined(ESP8266) || !defined(ADC_PIN)
|
||||
#define ADC_PIN A0 //on nodeMCU this is D3 GPIO0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user