Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- pnkpntr
- Date:
- 2018-09-26
- Revision:
- 0:e67b3d8994f1
File content as of revision 0:e67b3d8994f1:
#include "mbed.h"
Serial pc(USBTX, USBRX);
DigitalOut led (LED1);
char cmd[100];
int main() {
//pc.baud(19200);
pc.baud(921600);
//pc.printf("Echoes back to the screen anything you type\n");
while(1) {
if (pc.readable()>0)
{
led = 1;
pc.scanf("%s",cmd);
//pc.putc(pc.getc());
led = 0;
pc.printf(cmd);
}
else
{
//led = !led;
wait(0.2);
}
}
}