Remodeling Xbox Wireless controller with mbed LPC1768

Dependencies:   ACM1602NI mbed

Fork of XBOX-NHK2015 by mbedを用いた制御学生の制御

Files at this revision

API Documentation at this revision

Comitter:
eil4nyqn
Date:
Fri Jan 22 08:56:17 2016 +0000
Commit message:
AyaneLDK

Changed in this revision

ACM1602NI.lib Show annotated file Show diff for this revision Revisions of this file
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
diff -r 000000000000 -r a44e054c96e8 ACM1602NI.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ACM1602NI.lib	Fri Jan 22 08:56:17 2016 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/takuo/code/ACM1602NI/#661827681a12
diff -r 000000000000 -r a44e054c96e8 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Jan 22 08:56:17 2016 +0000
@@ -0,0 +1,61 @@
+#include "mbed.h"
+#include "ACM1602NI.h"
+
+
+ACM1602NI lcd(p28,p27);
+BusIn XYAB(p5,p6,p7,p8);
+BusIn cross(p9,p10,p11,p12);
+AnalogIn left(p15);
+AnalogIn Right(p17);
+AnalogIn RH(p18);
+AnalogIn LH(p16);
+//JST = Joy Stick TactSW
+BusIn JST(p23,p24);
+BusIn SB(p29,p30);
+BusIn other(p21,p22);
+AnalogIn LT(p20);
+AnalogIn RT(p19);
+DigitalOut led(p26);
+DigitalOut led2(p25);
+Serial con(p13,p14);
+
+int main() {
+    XYAB.mode(PullUp);
+    other.mode(PullUp);
+    SB.mode(PullUp);
+    JST.mode(PullUp);
+    cross.mode(PullUp);
+    uint8_t i,n,m,p,q;
+    double z,x,c,v,g,j;
+    
+    char data=0,check=255;
+    
+    //lcd.printf("Start\n");
+    //wait(2);
+    
+    while(1) {
+        i = XYAB;
+        n = cross;
+        m = JST;
+        p = SB;
+        q = other;
+        
+        z = left;
+        x = Right;
+        c = LT;
+        v = RT;
+        g = RH;
+        j = LH;
+        
+        led = 1;
+        led2 = 1;
+        
+        data=p;
+        
+        con.putc(check);
+        con.putc(data);
+        
+        
+        printf("%d-%d-%d-%d-%d--%lf-%lf-%lf-%lf-%lf-%lf\r\n",i,n,m,p,q,z,x,c,v,j,g);
+    }
+}
diff -r 000000000000 -r a44e054c96e8 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Fri Jan 22 08:56:17 2016 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/ba1f97679dad
\ No newline at end of file