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: sensor_board.h
- Revision:
- 27:27cffdb2e9d3
- Child:
- 29:c2838405fa5c
diff -r bdb2bf657f29 -r 27cffdb2e9d3 sensor_board.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sensor_board.h Mon Jan 09 23:26:52 2017 +0000
@@ -0,0 +1,23 @@
+#include "common.h"
+#include "sensor.h"
+#include <vector>
+
+class Board {
+ public:
+ explicit Board(unsigned long long rx_address, DigitalSensor* digital_sensor,
+ AnalogSensor* analog_sensor, unsigned long long tx_address=MASTER_ADDRESS);
+
+ void run();
+
+ private:
+ void displayRadioSetup();
+ bool send(Data data_to_send);
+ void updateSensor(Sensor* sensor, bool* should_send_data);
+
+ Serial pc_;
+ nRF24L01P radio_;
+ AnalogSensor* analog_sensor_;
+ DigitalSensor* digital_sensor_;
+ Ticker analog_ticker_;
+ Ticker digital_ticker_;
+};
\ No newline at end of file