NagaokaRoboticsClub_mbedTeam / Mbed 2 deprecated LED2

Dependencies:   mbed

Committer:
piroro4560
Date:
Wed Dec 23 08:20:22 2020 +0000
Revision:
1:6e1e4116e0bd
Parent:
0:4db87cec0fe6
shuusei

Who changed what in which revision?

UserRevisionLine numberNew contents of line
piroro4560 0:4db87cec0fe6 1 #include "mbed.h"
piroro4560 0:4db87cec0fe6 2
piroro4560 0:4db87cec0fe6 3 DigitalOut LED(LED1);
piroro4560 1:6e1e4116e0bd 4 DigitalIn button(USER_BUTTON);
piroro4560 0:4db87cec0fe6 5 Serial pc(USBTX, USBRX、115200); // tx, rx
piroro4560 0:4db87cec0fe6 6
piroro4560 0:4db87cec0fe6 7 int main() {
piroro4560 0:4db87cec0fe6 8 while(1) {
piroro4560 0:4db87cec0fe6 9 wait_ms(200);
piroro4560 0:4db87cec0fe6 10 LED = !LED;
piroro4560 0:4db87cec0fe6 11 pc.printf("success\t");
piroro4560 1:6e1e4116e0bd 12 if (button) pc.printf("button is on");
piroro4560 0:4db87cec0fe6 13 pc.printf("\r\n");
piroro4560 0:4db87cec0fe6 14 }
piroro4560 0:4db87cec0fe6 15 }