You can write text with this programm.
Fork of Minor_test_serial by
main.cpp
- Committer:
- JanderGilbers
- Date:
- 2016-09-12
- Revision:
- 1:26ce7013f2c5
- Parent:
- 0:c8f15874531b
- Child:
- 2:4ffe049e7231
File content as of revision 1:26ce7013f2c5:
#include "mbed.h" #include "MODSERIAL.h" DigitalOut myled(LED_GREEN); MODSERIAL pc(USBTX, USBRX); char c; int main() { int i = 0; pc.baud(115200); pc.printf("Hello World!\n"); while(true){ { c = pc.getc(); pc.printf("%c", c); // print the value of variable i i++; // increment the variable myled = !myled; // toggle a led wait(0.1f); } } }