Sample program of PS_PAD. ( https://developer.mbed.org/users/okini3939/code/PS_PAD/ ) Special thanks to Suga koubou(okini3939). Available for PlayStationController, VS-C1, VS-C3, etc...
Revision 0:1ede48b6ea40, committed 2015-09-01
- Comitter:
- ds074704261
- Date:
- Tue Sep 01 15:00:42 2015 +0000
- Commit message:
- Initial Commit
Changed in this revision
diff -r 000000000000 -r 1ede48b6ea40 PS_PAD.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/PS_PAD.lib Tue Sep 01 15:00:42 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/okini3939/code/PS_PAD/#840370e1dcce
diff -r 000000000000 -r 1ede48b6ea40 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Tue Sep 01 15:00:42 2015 +0000 @@ -0,0 +1,31 @@ +/* + * ====================== + * VS-C3/VS-RCV3 PIN + * ====================== + * 1:NC 2:NC + * 3:DAT 4:CMD + * 5:SEL 6:CLK + * 7:+5~7V 8:NC + * 9:+3V 10:GND + * + */ + +#include "mbed.h" +#include "PS_PAD.h" + +PS_PAD vsc3(p5, p6, p7, p21); + +DigitalOut myled[] = {LED1, LED2, LED3, LED4}; + +int main() { + vsc3.init(); + printf("START\n"); + while(1) { + vsc3.poll(); + myled[0] = vsc3.read(PS_PAD::PAD_CIRCLE); + myled[1] = vsc3.read(PS_PAD::PAD_SQUARE); + myled[2] = vsc3.read(PS_PAD::PAD_TRIANGLE); + myled[3] = vsc3.read(PS_PAD::PAD_X); + wait(0.05); + } +}
diff -r 000000000000 -r 1ede48b6ea40 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Tue Sep 01 15:00:42 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/8ed44a420e5c \ No newline at end of file