EXO11

Dependencies:   mbed

Revision:
0:2524bd1f21f0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jan 06 07:54:46 2017 +0000
@@ -0,0 +1,65 @@
+    #include "mbed.h"
+
+BusOut leds (D5,D8,D9);
+BusIn mabite (D4,A4,A5,A3,A2);
+
+
+
+
+int main()
+{
+
+
+
+    while(1) {
+
+    switch (mabite) 
+    {
+       case 0x00 : //initial
+       
+       leds = ~0x00;
+      
+       
+       break;
+       
+        case 0x01 : // apuuie
+       
+       leds = ~0x01;
+      
+       break;
+       
+        case 0x02 : // gauche
+       
+       leds = ~0x02;
+      
+       break;
+       
+       case 0x04 : // droite
+       
+       leds = ~0x04;
+      
+       break;
+       
+       case 0x08 : // bas
+       
+       leds = ~0x03;
+       
+       break;
+       
+       case 0x10 : // haut
+       
+       leds = ~0x06;
+          
+       break;
+       
+       
+        
+        
+        
+        }
+    
+
+
+    }
+}
+