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.
Fork of frdm_USB-HID-Mouse-Keyboard_auto by
Diff: main.cpp
- Revision:
- 0:92846b9895f1
- Child:
- 1:9203186a82fd
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Dec 31 17:24:55 2015 +0000
@@ -0,0 +1,21 @@
+#include "mbed.h"
+#include "USBMouseKeyboard.h"
+
+DigitalOut led(LED1);
+USBMouseKeyboard key_mouse;
+
+int main(void) {
+ while (1) {
+ key_mouse.move(60, 0);
+ key_mouse.doubleClick();
+ key_mouse.keyCode(KEY_CAPS_LOCK);
+ key_mouse.printf("hello world from frdm-k64f. \n");
+ wait(2);
+ key_mouse.move(-60, 0);
+ key_mouse.doubleClick();
+ key_mouse.keyCode(KEY_CAPS_LOCK);
+ key_mouse.printf("hello world from frdm-k64f. \n");
+ led = ((key_mouse.lockStatus() & 0x2) >> 1); /* second bit is caps lock */
+ wait(2);
+ }
+}
