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.
Dependencies: mbed
main.cpp
- Committer:
- aoikoizumi
- Date:
- 2019-11-01
- Revision:
- 0:5ac066a676fa
- Child:
- 1:3fc3afc28bda
File content as of revision 0:5ac066a676fa:
#include "mbed.h"
DigitalOut myled_1(p8);
DigitalOut myled_2(p11);
Serial pc(USBTX,USBRX);
int main()
{
while(1) {
if(pc.readable()) {
char sel=pc.getc();
if(sel=='i') {
myled_1=1;
myled_2=1;
printf("(1,1) \r\n");
}
if(sel=='m') {
myled_1=0;
myled_2=0;
printf("(0,0) \r\n");
}
if(sel=='j') {
myled_1=1;
myled_2=0;
printf("(1,0) \r\n");
}
if(sel=='k') {
myled_1=0;
myled_2=1;
printf("(0,1) \r\n");
}
}
}
}