Dice roll

Dependencies:   mbed

Revision:
1:8be4a41833fd
Parent:
0:68cc55f8a240
Child:
2:0432dad1e3ac
diff -r 68cc55f8a240 -r 8be4a41833fd main.cpp
--- a/main.cpp	Tue Oct 31 09:29:13 2017 +0000
+++ b/main.cpp	Wed Nov 01 09:17:20 2017 +0000
@@ -12,7 +12,6 @@
 volatile int n = 0;
 float t = 1;
 
-
 void Roll()
 {  
     ledg = 1; // green led off
@@ -35,13 +34,14 @@
     ledr = 1;
     ledg = 0;
     
-    while (true) {
+    while (true) 
+    {
         if(button1==0)
         { 
-        Roll();
-        wait(t); // wait before next roll to protect motors
-        ledb = 1;
-        ledg = 0; // green led on = ready to roll
-        }        
+            Roll();
+            wait(t); // wait before next roll to protect motors
+            ledb = 1;
+            ledg = 0; // green led on = ready to roll
+        }       
     }
 }
\ No newline at end of file