Embedded software Assessment 2

Dependencies:   MCP23017 SDFileSystem USBDevice WattBob_TextLCD mbed

Revision:
19:304b17087d06
Parent:
18:f485d46a7acb
Child:
20:00a9a95ef083
diff -r f485d46a7acb -r 304b17087d06 main.cpp
--- a/main.cpp	Tue Mar 04 17:03:38 2014 +0000
+++ b/main.cpp	Tue Mar 04 17:08:22 2014 +0000
@@ -31,12 +31,12 @@
     Counter++;
     if(Counter == 1800) Counter = 0;
     
-    if((float(Counter/4.0)-Counter/4)==0) ReadDigitalin();  //Pin 21
-    if((float(Counter/8.0)-Counter/8)==0) ReadAnalogin();   //Pin 22
-    if((float(Counter/10.0)-Counter/10)==0) FreqMsur();     //Pin 23
-    if((float(Counter/15.0)-Counter/15)==0) BinaryCounter();//Pin 24
-    if((float(Counter/18.0)-Counter/18)==0) InputCheck();   //Pin 25
-    if((float(Counter/20.0)-Counter/20)==0) Display();      //Pin 26
-    if((float(Counter/50.0)-Counter/50)==0) LogFile();      //Pin 27
+    if( Counter % 4 == 0) ReadDigitalin();  //Pin 21
+    if( Counter % 8 ==0) ReadAnalogin();   //Pin 22
+    if( Counter % 10 == 0) FreqMsur();     //Pin 23
+    if( Counter % 15 == 0) BinaryCounter();//Pin 24
+    if( Counter % 18 == 0) InputCheck();   //Pin 25
+    if( Counter % 20 == 0 ) Display();      //Pin 26
+    if( Counter % 50 == 0 ) LogFile();      //Pin 27
   
 }
\ No newline at end of file