Alix Germany / Mbed OS Coursework_Version_8

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

Revision:
5:f87129ac8bf3
diff -r 740cba3f2716 -r f87129ac8bf3 LCD.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LCD.cpp	Thu Nov 29 16:08:28 2018 +0000
@@ -0,0 +1,22 @@
+#include "mbed.h"
+#include "sample_hardware.hpp"
+#include "LCD.hpp"
+
+//EventQueue LCD_Queue;  //create an event queue for main
+Ticker read_Data; //used to read the sensor data information every 5 seconds from mail queue
+
+void LCD_Thread()
+{   
+    while(1)
+    {
+        m_oDisplay.LCD_Queue.call_every(1000, &m_oDisplay, &LCD_Data::display_LCD); //displays the current sensor information onto the LCD screen every x miliseconds
+        m_oDisplay.LCD_Queue.call_every(5000, &m_oDisplay, &LCD_Data::update_sensor_info); //reads sensor information every X miliseconds
+        m_oDisplay.LCD_Queue.dispatch();  //dispatches the above tasks to the queue, then blocks main forever unless ' break_dispatch () ' is used 
+        while(true) {
+            redLED = 1;
+            wait(0.5);
+            redLED = 0;
+            wait(0.1);    
+        }
+    }
+}