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...
main.cpp
- Committer:
- ds074704261
- Date:
- 2015-09-01
- Revision:
- 0:1ede48b6ea40
File content as of revision 0:1ede48b6ea40:
/* * ====================== * 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); } }