Poushen Ou
/
ou_mbed_uart
a simple uart (printf) test program
main.cpp
- Committer:
- poushen
- Date:
- 2018-06-17
- Revision:
- 0:48b5be00cf5e
File content as of revision 0:48b5be00cf5e:
#include "mbed.h" DigitalOut myled(LED2); // for LPCXpresso LPC1114 board // UART TX: xp9, dp16 // UART RX: xp10, dp15 // ************************************* // ** serial port: 9600, 8, N, 1, N // ************************************* //Serial pc(xp9, xp10); int main() { //pc.printf("LPC1114 demo \r\n"); while(1) { myled = 1; printf("led on\n\r"); for (int i=0; i<1000000; i++); //wait(1); myled = 0; printf("led off\n\r"); for (int i=0; i<1000000; i++); //wait(1); } }