Embedded software Assessment 2

Dependencies:   MCP23017 SDFileSystem USBDevice WattBob_TextLCD mbed

Revision:
4:4bb228d1f6c2
Parent:
1:9a3cfeca7ecd
Child:
5:99cf489dcae4
Child:
7:d9f86e1b8185
--- a/Function.h	Sat Feb 15 17:33:08 2014 +0000
+++ b/Function.h	Sat Feb 15 18:37:26 2014 +0000
@@ -6,7 +6,18 @@
 WattBob_TextLCD LCD(&Port); // pointer to 2*16 chacater LCD object
 
 Timer TimeA;
+Ticker CallFunction1;
+Ticker CallFunction2;
+Ticker CallFunction3;
+Ticker CallFunction4;
+Ticker CallFunction5;
+Ticker CallFunction6;
+Ticker CallFunction7;
 
+DigitalOut led1(LED1);
+DigitalOut led2(LED2);
+DigitalOut led3(LED3);
+DigitalOut led4(LED4);
 void Write_LCD(const char STR[],int8_t PY,int8_t PX,bool clr){
     if(clr)
         LCD.cls();
@@ -18,4 +29,36 @@
     Port.write_bit(1,BL_BIT); 
     Write_LCD("Muaiyd",0,4,1);
     Write_LCD("Heriot-Watt Uni.",1,0,0);
+}
+
+void job1(){
+    Write_LCD("2 S",0,0,1); 
+    led1=!led1;
+}
+
+void job2(){
+    Write_LCD("4 S",0,5,0);  
+    led2=!led2;  
+}
+
+void job3(){
+    Write_LCD("6 S",0,9,0); 
+    led3=!led3;  
+}
+
+void job4(){
+    Write_LCD("8 S",0,12,0); 
+    led4=!led4;   
+}
+
+void job5(){
+    Write_LCD("10 S",1,0,0);    
+}
+
+void job6(){
+    Write_LCD("12 S",1,5,0);    
+}
+
+void job7(){
+    Write_LCD("22 S",1,10,0);    
 }
\ No newline at end of file