uwick. W
/
MameController
Mamecontroller/joystick device wrapper library
main.cpp
- Committer:
- uswickra
- Date:
- 2014-11-26
- Revision:
- 0:4babde63a16e
- Child:
- 2:018f204f6037
File content as of revision 0:4babde63a16e:
#include "mbed.h" #include "USBKeyboard.h" #include "joystick.h" //LED1: NUM_LOCK //LED2: CAPS_LOCK //LED3: SCROLL_LOCK BusOut leds(LED1, LED2, LED3); //USBKeyboard USBKeyboard keyboard; //Serial uart(USBTX, USBRX); Serial uart(p28, p27); SerialJoystick 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(); }