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: main.cpp
- Revision:
- 7:e51d0fbb1a25
- Child:
- 11:4c3876be77b1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Jan 05 13:13:28 2017 +0000
@@ -0,0 +1,23 @@
+#include "master.h"
+#include "sensor_main.h"
+#include "common.h"
+
+#define MODE MASTER
+#define MASTER 0
+#define SLAVE1 1
+
+int main() {
+ switch(MODE) {
+ case MASTER:
+ master_loop();
+ break;
+ case SLAVE1:
+ // TODO vector of description for multiple sensors
+ // TODO sensor class
+ SensorDescription description(PIR1, PIR1_ADDRESS, MASTER_ADDRESS);
+ sensor_loop(description);
+ break;
+ }
+
+ return 0;
+}
\ No newline at end of file