code for sterring wheel interface

Dependencies:   MBC002-DigitalIn

Revision:
6:69152576b147
Parent:
5:6dc69540b634
Child:
7:e80a50f5b898
diff -r 6dc69540b634 -r 69152576b147 main.cpp
--- a/main.cpp	Wed Jun 27 12:59:24 2018 +0000
+++ b/main.cpp	Wed Jun 27 13:51:15 2018 +0000
@@ -49,10 +49,9 @@
             led = 0;
             myled =0;            
         }
-
-// ASSIGN to a variable the size of ARRAYSEND
-
-//From BIT 0 of ARRAY_SEND to the final BIT OF ARRAYSEND
+//If a button is 1
+if (pushButton1==1 || pushButton2 ==1 ) {
+//From BIT 0 to the final BIT OF ARRAYSEND
 int BIT;
 for (BIT = 0; i < 8; i ++) {
 //if the position of bit is even turn on the leds for bit value time, 
@@ -60,9 +59,12 @@
   if ( BIT % 2==0) {           
              myled =1;
               led =1;
-             wait (ARRAY_SEND[BIT]);}
+ //            wait (ARRAY_SEND[BIT]);}
+             wait (1);}
+ 
  else {            
              myled =0;
               led =0;
-             wait (ARRAY_SEND[BIT]);}
- }}}
\ No newline at end of file
+ //            wait (ARRAY_SEND[BIT]);}
+              wait (1);}
+}}}}
\ No newline at end of file