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:
- rohangala
- Date:
- 2016-03-15
- Revision:
- 1:630aef63181c
- Parent:
- 0:98be6bf27557
- Child:
- 2:015a5a76bb82
File content as of revision 1:630aef63181c:
#include "mbed.h" #include "stdio.h" DigitalOut myled(LED1); Serial pc(USBTX, USBRX); Serial micro(PTA2, PTA1); // tx, rx char buff[]={'\0'}; uint8_t val; int main() {myled = 1; // wait(3); while(1) { if(micro.readable()) { myled = 0; val=(micro.getc()); if(val == 0x00) { pc.putc(0x04); } if(val == 0x01) { pc.putc(0x09); } val=0x00; wait(2); myled=1; } } }