![](/media/cache/profiles/6dbc3b4a7e1887c15654196a06a806f0.jpg.50x50_q85.jpg)
SDVX controller project
main.cpp
- Committer:
- lukeoftheaura
- Date:
- 2018-01-12
- Revision:
- 2:19001d314c68
- Parent:
- 1:923d8a726613
- Child:
- 3:b88fff5420e2
File content as of revision 2:19001d314c68:
#include "mbed.h" #include "USBKeyboard.h" #include "USBMouse.h" #include "USBHID.h" // DigitalIn BT1(PTA2); Serial PC(USBTX,USBRX); USBKeyboard key; DigitalOut LED(LED1); DigitalIn button1(PTB8); bool bt1state = false; int main() { for(;;) { if(button1 == 0) { key.keyPress('c'); bt1state = true; } else if(bt1state == true) { key.keyRelease(); bt1state = false; } } }