![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
This demo program output text to the serial link once a second. It was written as part of the Heriot Watt Robotics Society Hamilton Circle Electronics Workshop
Diff: main.cpp
- Revision:
- 0:be67304b610a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 09 17:05:43 2017 +0000 @@ -0,0 +1,16 @@ +#include "mbed.h" + +Serial pc(USBTX, USBRX); + +int counter = 0; + +int main() { + + while(1) { + counter++; + if(counter % 10 == 0){ + pc.printf("%d\n\r", counter); + } + wait(0.1); + } +} \ No newline at end of file