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
Diff: main.cpp
- Revision:
- 0:61fed686b4a2
- Child:
- 4:7ec5c7e1e80f
diff -r 000000000000 -r 61fed686b4a2 main.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Apr 03 09:00:24 2014 +0000
@@ -0,0 +1,15 @@
+#include "mbed.h"
+#include "USBMouseKeyboard.h"
+
+DigitalOut led(LED1);
+USBMouseKeyboard key_mouse;
+
+int main(void) {
+ while (true) {
+ key_mouse.printf("hello world from frdm-k64f. \n");
+ key_mouse.move(20, 0);
+ wait(1);
+ key_mouse.keyCode(KEY_CAPS_LOCK);
+ led = ((key_mouse.lockStatus() & 0x2) >> 1); /* second bit is caps lock */
+ }
+}
