NagaokaRoboticsClub_mbedTeam / Mbed 2 deprecated LED2

Dependencies:   mbed

Files at this revision

API Documentation at this revision

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