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: mbed
Revision 1:6e1e4116e0bd, committed 2020-12-23
- Comitter:
- piroro4560
- Date:
- Wed Dec 23 08:20:22 2020 +0000
- Parent:
- 0:4db87cec0fe6
- Commit message:
- shuusei
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 4db87cec0fe6 -r 6e1e4116e0bd main.cpp --- a/main.cpp Wed Dec 23 08:01:02 2020 +0000 +++ b/main.cpp Wed Dec 23 08:20:22 2020 +0000 @@ -1,7 +1,7 @@ #include "mbed.h" DigitalOut LED(LED1); -DigitalIn(USER_BUTTON); +DigitalIn button(USER_BUTTON); Serial pc(USBTX, USBRX、115200); // tx, rx int main() { @@ -9,7 +9,7 @@ wait_ms(200); LED = !LED; pc.printf("success\t"); - if (USER_BUTTON) pc.printf("button is on"); + if (button) pc.printf("button is on"); pc.printf("\r\n"); } } \ No newline at end of file