Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: WeatherStation.h
- Revision:
- 4:bfe306335065
- Child:
- 5:0d9e292a9d06
diff -r 951985127bca -r bfe306335065 WeatherStation.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/WeatherStation.h Tue Mar 05 10:27:40 2019 +0000
@@ -0,0 +1,42 @@
+#pragma once
+
+#include "Logger.h"
+#include "NRFDevKit.h"
+#include "LPS25HBDevice.h"
+#include "HDC1000Device.h"
+
+class WeatherStation
+{
+public:
+ // constructor
+ WeatherStation(NRFDevKit& nrfDevKit, Logger& logger);
+
+ // called for starting the weather station
+ // it will start getting measurements and advertise with data measurements
+ void start();
+
+ // called by timer
+ void performMeasurements(void);
+
+private:
+ // data members
+
+ // event queue for handling all events (including timers)
+ events::EventQueue m_eventQueue;
+
+ // measurement interval
+ static const int m_measurementInterval;
+
+ // blink interval
+ static const int m_blinkInterval;
+
+ // reference to dev kit
+ NRFDevKit& m_nrfDevKit;
+
+ // reference to logger
+ Logger& m_logger;
+
+ LPS25HBDevice m_lps25hb;
+
+ HDC1000Device m_hdc1000;
+};