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.
Revision 2:19001d314c68, committed 2018-01-12
- Comitter:
- lukeoftheaura
- Date:
- Fri Jan 12 19:19:09 2018 +0000
- Parent:
- 1:923d8a726613
- Child:
- 3:b88fff5420e2
- Commit message:
- meh
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Fri Jan 12 19:12:54 2018 +0000
+++ b/main.cpp Fri Jan 12 19:19:09 2018 +0000
@@ -8,11 +8,17 @@
USBKeyboard key;
DigitalOut LED(LED1);
DigitalIn button1(PTB8);
+bool bt1state = false;
int main() {
for(;;) {
if(button1 == 0) {
key.keyPress('c');
+ bt1state = true;
+ }
+ else if(bt1state == true) {
+ key.keyRelease();
+ bt1state = false;
}
}
}