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.
Fork of mbed-os-example-mbed5-blinky by
main.cpp
- Committer:
- bhimebau
- Date:
- 2018-01-23
- Revision:
- 57:a3c0babfccea
- Parent:
- 56:939270a94e87
- Child:
- 58:f1306dbfb574
File content as of revision 57:a3c0babfccea:
#include "mbed.h"
DigitalOut led1(LED1);
Serial pc(USBTX, USBRX);
DigitalIn button(PC_13);
// main() runs in its own thread in the OS
int main() {
while (true) {
if (button.read()) led1 = 1;
else led1=0;
//pc.putc(pc.getc());
//led1 = !led1;
//if (led1) {
// pc.printf("ON\n\r");
// wait(2);
// }
// else {
// pc.printf("OFF\n\r");
// wait(1);
// }
}
}
