Alix Germany / Mbed OS Coursework_Version_8

Dependencies:   BMP280 ELEC350-Practicals-FZ429 TextLCD BME280 ntp-client

Committer:
O_Thom
Date:
Thu Nov 29 16:08:28 2018 +0000
Revision:
5:f87129ac8bf3
Commit before change from sample message class to typedef struct

Who changed what in which revision?

UserRevisionLine numberNew contents of line
O_Thom 5:f87129ac8bf3 1 #include "mbed.h"
O_Thom 5:f87129ac8bf3 2 #include "sample_hardware.hpp"
O_Thom 5:f87129ac8bf3 3 #include "Sampler.hpp"
O_Thom 5:f87129ac8bf3 4
O_Thom 5:f87129ac8bf3 5 Sampler m_os; // Initialise the s object
O_Thom 5:f87129ac8bf3 6
O_Thom 5:f87129ac8bf3 7 void SAMP_Thread()
O_Thom 5:f87129ac8bf3 8 {
O_Thom 5:f87129ac8bf3 9 while(1)
O_Thom 5:f87129ac8bf3 10 {
O_Thom 5:f87129ac8bf3 11 SAMP_Queue.call_every(1000, &m_os, &Sampler::publishSample); // Publish sample
O_Thom 5:f87129ac8bf3 12 SAMP_Queue.dispatch();
O_Thom 5:f87129ac8bf3 13 while(true) { // Flash if the event queue is exited.
O_Thom 5:f87129ac8bf3 14 yellowLED = 1;
O_Thom 5:f87129ac8bf3 15 wait(0.5);
O_Thom 5:f87129ac8bf3 16 yellowLED = 0;
O_Thom 5:f87129ac8bf3 17 wait(0.1);
O_Thom 5:f87129ac8bf3 18 }
O_Thom 5:f87129ac8bf3 19 }
O_Thom 5:f87129ac8bf3 20 }