Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MMA8451QASD USBDeviceASD mbed
Fork of FTF2014_lab3_part2 by
main.cpp@0:61fed686b4a2, 2014-04-03 (annotated)
- Committer:
- Kojto
- Date:
- Thu Apr 03 09:00:24 2014 +0000
- Revision:
- 0:61fed686b4a2
- Child:
- 4:7ec5c7e1e80f
initial version
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Kojto | 0:61fed686b4a2 | 1 | #include "mbed.h" |
| Kojto | 0:61fed686b4a2 | 2 | #include "USBMouseKeyboard.h" |
| Kojto | 0:61fed686b4a2 | 3 | |
| Kojto | 0:61fed686b4a2 | 4 | DigitalOut led(LED1); |
| Kojto | 0:61fed686b4a2 | 5 | USBMouseKeyboard key_mouse; |
| Kojto | 0:61fed686b4a2 | 6 | |
| Kojto | 0:61fed686b4a2 | 7 | int main(void) { |
| Kojto | 0:61fed686b4a2 | 8 | while (true) { |
| Kojto | 0:61fed686b4a2 | 9 | key_mouse.printf("hello world from frdm-k64f. \n"); |
| Kojto | 0:61fed686b4a2 | 10 | key_mouse.move(20, 0); |
| Kojto | 0:61fed686b4a2 | 11 | wait(1); |
| Kojto | 0:61fed686b4a2 | 12 | key_mouse.keyCode(KEY_CAPS_LOCK); |
| Kojto | 0:61fed686b4a2 | 13 | led = ((key_mouse.lockStatus() & 0x2) >> 1); /* second bit is caps lock */ |
| Kojto | 0:61fed686b4a2 | 14 | } |
| Kojto | 0:61fed686b4a2 | 15 | } |
