NagaokaRoboticsClub_mbedTeam / Mbed 2 deprecated LED2

Dependencies:   mbed

main.cpp

Committer:
piroro4560
Date:
2020-12-23
Revision:
1:6e1e4116e0bd
Parent:
0:4db87cec0fe6

File content as of revision 1:6e1e4116e0bd:

#include "mbed.h"

DigitalOut LED(LED1);
DigitalIn button(USER_BUTTON);
Serial pc(USBTX, USBRX、115200); // tx, rx
 
int main() {
    while(1) {
        wait_ms(200);
        LED = !LED;
        pc.printf("success\t");
        if (button) pc.printf("button is on");
        pc.printf("\r\n");
    }
}