test

Dependencies:   mbed

Committer:
chauvoluuhuong
Date:
Mon Aug 07 09:25:04 2017 +0000
Revision:
0:2e29df975b6f
stm32f407;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
chauvoluuhuong 0:2e29df975b6f 1 #include "mbed.h"
chauvoluuhuong 0:2e29df975b6f 2
chauvoluuhuong 0:2e29df975b6f 3 // define the Serial object
chauvoluuhuong 0:2e29df975b6f 4 Serial pc(USBTX, USBRX);
chauvoluuhuong 0:2e29df975b6f 5 DigitalOut led1(PD_14);
chauvoluuhuong 0:2e29df975b6f 6
chauvoluuhuong 0:2e29df975b6f 7 int main() {
chauvoluuhuong 0:2e29df975b6f 8 pc.baud(115200);
chauvoluuhuong 0:2e29df975b6f 9 while (true) {
chauvoluuhuong 0:2e29df975b6f 10 led1 = !led1;
chauvoluuhuong 0:2e29df975b6f 11
chauvoluuhuong 0:2e29df975b6f 12 // Print something over the serial connection
chauvoluuhuong 0:2e29df975b6f 13 pc.printf("Blink! LED is now %d\r\n", led1.read());
chauvoluuhuong 0:2e29df975b6f 14
chauvoluuhuong 0:2e29df975b6f 15 wait(1);
chauvoluuhuong 0:2e29df975b6f 16 }
chauvoluuhuong 0:2e29df975b6f 17 }