UoD_ME21001_Group_2_08 / Mbed 2 deprecated ME21001_Lab04_Exercise_06

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
mridley
Date:
Tue Oct 15 14:05:26 2019 +0000
Parent:
0:5524eda855cf
Commit message:
new

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Tue Oct 15 12:10:36 2019 +0000
+++ b/main.cpp	Tue Oct 15 14:05:26 2019 +0000
@@ -35,21 +35,21 @@
     pc.printf("Analogue value: %6.4f     Equivalent voltage: %6.4fvdc\n\r", analogue_val,analogue_val*3.3);
 
     wait(0.250);           // wait 250ms
-    if (analogue_val<0.2{ //all leds off if less than 0.2
+    if (analogue_val<0.2){ //all leds off if less than 0.2
         lowled=0;
         quartled=0;
         halfled=0;
         highled=0;
         break;
         }
-    else if(analogue_val<0.4{//low led on if less than 0.4
+    else if(analogue_val<0.4){//low led on if less than 0.4
         lowled=1;
         quartled=0;
         halfled=0;
         highled=0;
         
         }
-    else if(analogue_val<0.6{//low led and quart led on if less than 0.6
+    else if(analogue_val<0.6){//low led and quart led on if less than 0.6
         lowled=1;
         quartled=1;
         halfled=0;
@@ -69,6 +69,7 @@
         halfled=1;
         highled=1;
         
+        
         }
   }
 }