Seri Haberleşme Baud Rate değiştirme
Dependencies: mbed
Diff: main.cpp
- Revision:
- 0:dde3632b5960
diff -r 000000000000 -r dde3632b5960 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 11 05:10:45 2018 +0000 @@ -0,0 +1,17 @@ +#include "mbed.h" + +Serial device(USBTX, USBRX); // tx, rx +int rd = 0; +int main() { + device.baud(115200); + while(1){ + device.printf("Hello World\n"); + rd = device.readable(); + if(rd !=0) + { + device.putc(device.getc()); + } + + wait(1.0); + } +} \ No newline at end of file