add interrupt mode define
This commit is contained in:
parent
d23014fb85
commit
496a72255d
|
@ -13,7 +13,7 @@ void Sensor_Raingauge::init() //Things to be done during setup()
|
|||
init_ok=true;
|
||||
|
||||
pinMode(pin,INPUT_PULLUP);
|
||||
attachInterrupt(digitalPinToInterrupt(pin),interrupt_raingauge,CHANGE); //anemometer interrupt
|
||||
attachInterrupt(digitalPinToInterrupt(pin),interrupt_raingauge,SENSOR_Raingauge_interruptmode); //anemometer interrupt
|
||||
}
|
||||
|
||||
//Also called during setup()
|
||||
|
|
|
@ -26,12 +26,17 @@ private:
|
|||
|
||||
//value in [mm] or [L/m^2]
|
||||
|
||||
//#define RAINGAUGE_FLIPAMOUNT 0.38888 //how much mm rain (L/m^2) per gauge flip. mL (rain to flip) / A (opening area)
|
||||
//#define RAINGAUGE_FLIPAMOUNT 0.38888 //how much mm rain (L/m^2) per gauge flip. (rain to flip) [L] / A (opening area) [m^2]
|
||||
//was 0.69292 until 201702
|
||||
/* Calibration:
|
||||
/* Calibration 2018:
|
||||
* Test1: 1000mL -> 259 Flips
|
||||
* Test2: 1000mL -> 256 in ca 10min
|
||||
* -> 3,9mL per Flip, opening diameter =113mm -> A=0,010028749
|
||||
* -> 3,9mL per Flip, opening diameter =113mm -> A=0,010028749 m²
|
||||
* -D RAINGAUGE_FLIPAMOUNT=0.29914
|
||||
*
|
||||
* Calibration 2024:
|
||||
* 60 Flips = 100mL => 1.66mL / Flip. Opening area 110mm*50mm = 0,005 m²
|
||||
* -D RAINGAUGE_FLIPAMOUNT=0.332
|
||||
*/
|
||||
|
||||
void updateRaingauge();
|
||||
|
|
|
@ -71,6 +71,7 @@ build_flags =
|
|||
-D RAINGAUGE_FLIPAMOUNT=0.29914
|
||||
-D SENSOR_Raingauge_readdelay=1000
|
||||
-D SENSOR_Raingauge_senddelaymax=1000*60*60 #also used for rain waiting timeout
|
||||
-D SENSOR_Raingauge_interruptmode=CHANGE
|
||||
# Cable from Anemometer: Black=GND, Blue=3v3, Brown=Signal (needs pullup (internal))
|
||||
#Cable colors from anemometers sensor (before longer able): blue=gnd, brown=vcc, white=signal
|
||||
|
||||
|
|
Loading…
Reference in New Issue