for each button pressed nucleo sends a command, used to interface citroen steering wheel command to keenwood car radio

Dependencies:   MBC002-DigitalIn

Fork of steering_wheel_controls_TO_KEENWOOD_RADIO_INFRARED_INTERFACE by luca visconti

Revision:
2:7c5890e1af90
Parent:
1:1bd5272d7a1f
Child:
3:82270ac03cb7
--- a/main.cpp	Wed Jun 27 08:36:52 2018 +0000
+++ b/main.cpp	Wed Jun 27 10:11:24 2018 +0000
@@ -52,18 +52,17 @@
         }
 
 // ASSIGN to a variable the size of ARRAYSEND
-int BITS = sizeof (ARRAY_SEND)
 
 //From BIT 0 of ARRAY_SEND to the final BIT OF ARRAYSEND
-for (BIT = 0; i < BITS; i ++) {
+for (BIT = 0; i < 4; i ++) {
 //if the position of bit is even turn on the leds for bit value time, 
 //if bit is odd turn off the leds for bit value time  
-  if (sizeof (ARRAY_SEND[BIT] % 2==0)) {           
+  if ( BIT % 2==0)) {           
              myled =1;
               led =1;
-             wait (BIT);}
+             wait (ARRAY_SEND[BIT]);}
  else {            
              myled =0;
               led =0;
-             wait (BIT);}
+             wait (ARRAY_SEND[BIT]);}
  }}
\ No newline at end of file