uwick. W
/
MameController
Mamecontroller/joystick device wrapper library
main.cpp
- Committer:
- bhavk11
- Date:
- 2014-12-01
- Revision:
- 3:13387aecfca2
- Parent:
- 2:018f204f6037
- Child:
- 4:4f6e38b6c07e
File content as of revision 3:13387aecfca2:
#include "mbed.h" #include "USBKeyboard.h" #include "joystick.h" DebounceIn Up(p19); DebounceIn Down(D2); DebounceIn Left(D3); DebounceIn Right(D4); DebounceIn Jump(D5); DebounceIn Fire1(D6); DebounceIn Fire2(D7); BusOut leds(LED1, LED2, LED3); //USBKeyboard USBKeyboard keyboard; //Serial uart(USBTX, USBRX); Serial uart(p28, p27); GPIOJoystick joy; int main(void) { uart.baud(57600); uart.putc('A'); int k = 0 ; while(k<3) { //Printf is also completely supported int i = 100; float f = 0.5; char h = 0x05; uart.printf("i = %d, f = %f, h = %02X \r\n", i, f, h); wait(3); k++; } wait(2); joy.init(); }