You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's interupt based library with callbacks and ready to use on any board. The only difference accros boards would be in initializing 1 second timer, ie. on STM32 you could use RTC timer, ESP32 has its own timer object, Timer1 could be used Arduino Uno (ATmega328P) etc.
4
+
Arduino library for processing wind speed, wind wane and rain gauge sensors (WH1080, WH1090, Sparkfun)
5
5
6
-
# Example on STM32 platform
6
+
It's interupt based library with callbacks and ready to use on any board. The only difference accros boards would be in initializing 1 second timer, ie. on STM32 you could use RTC timer, ESP32 has its own timer object, Timer1 could be used Arduino Uno (ATmega328P) etc please see `examples/timers`
7
+
8
+
# Example
7
9
8
10
```cpp
9
-
#include<RTClock.h>
10
11
#include"WeatherMeters.h"
11
12
12
-
#defineanemometer_pin PB12
13
-
#define windvane_pin PB1
14
-
#define raingauge_pin PB14
15
-
16
-
#defineSAMPLES 8 // = 8 sec output
13
+
constint windvane_pin = A0;
14
+
constint anemometer_pin = 2;
15
+
constint raingauge_pin = 3;
17
16
18
-
volatilebool got_data = false;
19
-
20
-
RTClock rtclock(RTCSEL_LSE);
21
-
WeatherMeters meters(windvane_pin, SAMPLES);
17
+
WeatherMeters <6> meters(windvane_pin); // filter last 6 directions
0 commit comments