Compare commits
2 Commits
d23014fb85
...
4e87434b61
Author | SHA1 | Date |
---|---|---|
interfisch | 4e87434b61 | |
interfisch | 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();
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
data_dir=data_sensoratd03
|
||||
|
||||
|
||||
#Outdoor
|
||||
#Outdoor Weatherstation
|
||||
[env:sensoresp0]
|
||||
platform = espressif8266 @ 2.5.0 #using old esp version, because of "obsolete API, use ::begin(WiFiClient, url)" error. Try again if fix available in platformio over vscode
|
||||
board = d1_mini
|
||||
|
@ -68,9 +68,10 @@ build_flags =
|
|||
|
||||
-D SENSOR_RAINGAUGE
|
||||
-D SENSOR_Raingauge_PIN=D7
|
||||
-D RAINGAUGE_FLIPAMOUNT=0.29914
|
||||
-D RAINGAUGE_FLIPAMOUNT=0.332
|
||||
-D SENSOR_Raingauge_readdelay=1000
|
||||
-D SENSOR_Raingauge_senddelaymax=1000*60*60 #also used for rain waiting timeout
|
||||
-D SENSOR_Raingauge_interruptmode=RISING
|
||||
# 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