Famke Kardux
/
Minor_test_serial
test commit and publish
Fork of Minor_test_serial by
main.cpp
- Committer:
- Famkekardux
- Date:
- 2018-09-11
- Revision:
- 2:0e9af737aa1c
- Parent:
- 1:40470bc517f1
File content as of revision 2:0e9af737aa1c:
#include "mbed.h" #include "MODSERIAL.h" DigitalOut myled(LED_GREEN); MODSERIAL pc(USBTX, USBRX); DigitalIn button(ENTER); int main() { int i = 0; pc.baud(115200); pc.printf("Hello World!\r\n"); while (true) { wait(0.8f); // wait a small period of time pc.printf("%d \r\n", i); // print the value of variable i i++; // increment the variable myled = !myled; // toggle a led } }