![](/media/cache/profiles/6dbc3b4a7e1887c15654196a06a806f0.jpg.50x50_q85.jpg)
SDVX controller project
main.cpp@3:b88fff5420e2, 2018-01-12 (annotated)
- Committer:
- lukeoftheaura
- Date:
- Fri Jan 12 19:28:54 2018 +0000
- Revision:
- 3:b88fff5420e2
- Parent:
- 2:19001d314c68
- Child:
- 4:6192f1728e75
meh;
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 | 2:19001d314c68 | 11 | bool bt1state = false; |
lukeoftheaura | 0:a698d2e0b81c | 12 | |
lukeoftheaura | 0:a698d2e0b81c | 13 | int main() { |
lukeoftheaura | 0:a698d2e0b81c | 14 | for(;;) { |
lukeoftheaura | 3:b88fff5420e2 | 15 | LED = button1; |
lukeoftheaura | 0:a698d2e0b81c | 16 | if(button1 == 0) { |
lukeoftheaura | 0:a698d2e0b81c | 17 | key.keyPress('c'); |
lukeoftheaura | 2:19001d314c68 | 18 | } |
lukeoftheaura | 3:b88fff5420e2 | 19 | wait(0.1); |
lukeoftheaura | 3:b88fff5420e2 | 20 | key.keyPress('c'); |
lukeoftheaura | 3:b88fff5420e2 | 21 | // else if(button1 == 1) { |
lukeoftheaura | 3:b88fff5420e2 | 22 | // key.keyPress('c'); |
lukeoftheaura | 3:b88fff5420e2 | 23 | // } |
lukeoftheaura | 0:a698d2e0b81c | 24 | } |
lukeoftheaura | 0:a698d2e0b81c | 25 | } |