NagaokaRoboticsClub_mbedTeam / Mbed 2 deprecated LED2

Dependencies:   mbed

Revision:
1:6e1e4116e0bd
Parent:
0:4db87cec0fe6
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