Luke is a pseudonym
/
SDVXcontroller
SDVX controller project
main.cpp@0:a698d2e0b81c, 2018-01-12 (annotated)
- Committer:
- lukeoftheaura
- Date:
- Fri Jan 12 19:12:02 2018 +0000
- Revision:
- 0:a698d2e0b81c
- Child:
- 1:923d8a726613
Not working
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
lukeoftheaura | 0:a698d2e0b81c | 1 | #include "mbed.h" |
lukeoftheaura | 0:a698d2e0b81c | 2 | #include "USBKeyboard.h" |
lukeoftheaura | 0:a698d2e0b81c | 3 | #include "USBMouse.h" |
lukeoftheaura | 0:a698d2e0b81c | 4 | #include "USBHID.h" |
lukeoftheaura | 0:a698d2e0b81c | 5 | |
lukeoftheaura | 0:a698d2e0b81c | 6 | // DigitalIn BT1(PTA2); |
lukeoftheaura | 0:a698d2e0b81c | 7 | Serial PC(USBTX,USBRX); |
lukeoftheaura | 0:a698d2e0b81c | 8 | USBKeyboard key; |
lukeoftheaura | 0:a698d2e0b81c | 9 | DigitalOut LED(LED1); |
lukeoftheaura | 0:a698d2e0b81c | 10 | DigitalIn button1(PTB8); |
lukeoftheaura | 0:a698d2e0b81c | 11 | |
lukeoftheaura | 0:a698d2e0b81c | 12 | int main() { |
lukeoftheaura | 0:a698d2e0b81c | 13 | for(;;) { |
lukeoftheaura | 0:a698d2e0b81c | 14 | if(button1 == 0) { |
lukeoftheaura | 0:a698d2e0b81c | 15 | key.keyPress('c'); |
lukeoftheaura | 0:a698d2e0b81c | 16 | } |
lukeoftheaura | 0:a698d2e0b81c | 17 | wait(0.01); |
lukeoftheaura | 0:a698d2e0b81c | 18 | } |
lukeoftheaura | 0:a698d2e0b81c | 19 | } |