A program to show the use of a wireless xbox 360 controller. Has details on what data is given out from the controller as well as normalized values for the triggers and sticks
Dependencies: USBHost USBHostXpad mbed
Fork of USBHostXpad_HelloWorld by
Diff: main.cpp
- Revision:
- 11:f76e120a8520
- Parent:
- 10:4b0c8727f0c3
- Child:
- 13:015ec003c063
--- a/main.cpp Wed Dec 11 04:11:46 2013 +0000 +++ b/main.cpp Fri Dec 13 07:37:25 2013 +0000 @@ -21,7 +21,7 @@ // when connected, attach handler called on xpad event xpad.attachEvent(onXpadEvent); - xpad.led(XPAD_LED_ROTATE); + xpad.led(USBHostXpad::LED_ROTATE); Thread::wait(500); xpad.rumble(0xff, 0); Thread::wait(500); @@ -29,7 +29,7 @@ Thread::wait(500); xpad.rumble(0, 0); Thread::wait(500); - xpad.led(XPAD_LED1_ON); + xpad.led(USBHostXpad::LED1_ON); // wait until the mouse is disconnected while(xpad.connected()) {