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.
Dependencies: BMP280 ELEC350-Practicals-FZ429 TextLCD BME280 ntp-client
Diff: Sampler.cpp
- Revision:
- 5:f87129ac8bf3
diff -r 740cba3f2716 -r f87129ac8bf3 Sampler.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Sampler.cpp Thu Nov 29 16:08:28 2018 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "sample_hardware.hpp"
+#include "Sampler.hpp"
+
+Sampler m_os; // Initialise the s object
+
+void SAMP_Thread()
+ {
+ while(1)
+ {
+ SAMP_Queue.call_every(1000, &m_os, &Sampler::publishSample); // Publish sample
+ SAMP_Queue.dispatch();
+ while(true) { // Flash if the event queue is exited.
+ yellowLED = 1;
+ wait(0.5);
+ yellowLED = 0;
+ wait(0.1);
+ }
+ }
+}
\ No newline at end of file