Example software for a Cyclic Executive

Dependencies:   MCP23017 SDFileSystem WattBob_TextLCD mbed

Revision:
5:250f51c80ac1
Parent:
4:b85bc0d810e1
Child:
6:ceda53939eb8
--- a/Tasks.cpp	Fri Feb 26 10:36:23 2016 +0000
+++ b/Tasks.cpp	Fri Feb 26 10:44:38 2016 +0000
@@ -122,9 +122,18 @@
 }
 
 /* ==================================== Task 5 ==================================== */
-Task5::Task5()
+Task5::Task5(PinName sda, PinName scl, int address)
 {
-    
-    
+    _par_port = new MCP23017(sda,scl,address);
+    _lcd = new WattBob_TextLCD(_par_port);
+    _par_port -> write_bit(1,BL_BIT);
 }
 
+void Task5::updateDisplay(int task1Param,int task2Param, float task4Channel1, float task4Channel2)
+{
+    _lcd -> cls();
+    _lcd -> locate(0,0);
+    _lcd -> printf("F-%4dHz S1-%d ",task1Param,task2Param);
+    _lcd -> locate(1,0);
+    _lcd -> printf("C1-%1.2f C2-%1.2f ",task4Channel1,task4Channel2);
+}