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 USBKeyboard_HelloWorld by
Revision 7:eacdf8136a16, committed 2015-03-01
- Comitter:
- GOROman
- Date:
- Sun Mar 01 07:33:51 2015 +0000
- Parent:
- 6:17871da2a7e4
- Commit message:
- USB Keyboard
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Mar 01 13:23:58 2013 +0000 +++ b/main.cpp Sun Mar 01 07:33:51 2015 +0000 @@ -1,21 +1,18 @@ #include "mbed.h" #include "USBKeyboard.h" -//LED1: NUM_LOCK -//LED2: CAPS_LOCK -//LED3: SCROLL_LOCK -BusOut leds(LED1, LED2, LED3); -//USBKeyboard +// USBキーボードのフリをする USBKeyboard keyboard; int main(void) { while (1) { - keyboard.mediaControl(KEY_VOLUME_DOWN); +// keyboard.mediaControl(KEY_VOLUME_DOWN); keyboard.printf("Hello World from Mbed\r\n"); keyboard.keyCode('s', KEY_CTRL); - keyboard.keyCode(KEY_CAPS_LOCK); - wait(1); - leds = keyboard.lockStatus(); +// keyboard.keyCode(KEY_CAPS_LOCK); + + // 5秒待つ + wait(5); } } \ No newline at end of file