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
Revision 0:fdcc47f2da83, committed 2019-04-25
- Comitter:
- st17099ng
- Date:
- Thu Apr 25 07:58:41 2019 +0000
- Commit message:
- test;
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
mbed.bld | Show annotated file Show diff for this revision Revisions of this file |
diff -r 000000000000 -r fdcc47f2da83 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Apr 25 07:58:41 2019 +0000 @@ -0,0 +1,26 @@ +#include "mbed.h" + +DigitalIn Limits[] = { + DigitalIn(A2), + DigitalIn(A3), + DigitalIn(D2), + DigitalIn(D3) +}; + +DigitalOut led(LED1); +Serial pc(USBTX,USBRX); + +int main() +{ + Limits[0].mode(PullUp); + Limits[1].mode(PullUp); + Limits[2].mode(PullUp); + Limits[3].mode(PullUp); + while (1) { + pc.printf("\033[2J\033[1;1H limit1_%c",(Limits[0] == 1)? 'F':'T'); + pc.printf("\033[2;1H limit2_%c",(Limits[1] == 1)? 'F':'T'); + pc.printf("\033[3;1H limit3_%c",(Limits[2] == 1)? 'F':'T'); + pc.printf("\033[4;1H limit4_%c",(Limits[3] == 1)? 'F':'T'); + wait(0.1); + } +}
diff -r 000000000000 -r fdcc47f2da83 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Apr 25 07:58:41 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file