EXO11

Dependencies:   mbed

Files at this revision

API Documentation at this revision

Comitter:
cocolay
Date:
Fri Jan 06 07:54:46 2017 +0000
Commit message:
ryjy

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /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;
+       
+       
+        
+        
+        
+        }
+    
+
+
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jan 06 07:54:46 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/d75b3fe1f5cb
\ No newline at end of file