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:
- st17099ng
- Date:
- 2019-04-25
- Revision:
- 0:fdcc47f2da83
File content as of revision 0:fdcc47f2da83:
#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);
}
}