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: LCD.cpp
- 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);
+ }
+ }
+}