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:
- AnjaniVasavi
- Date:
- 2015-07-20
- Revision:
- 0:7681b3a2e015
File content as of revision 0:7681b3a2e015:
#include "mbed.h"
DigitalIn a(PTB1);
DigitalIn b(PTB0);
DigitalOut c(PTB8);
DigitalOut myled(LED1);
int main()
{
myled=0;
int count=0;
while(1)
{
// int count=0;
if(a==0)
{
count++;
if(count>=1)
{
c=1;
myled =0;
}
else
{
c=0;
myled =1;
}
}
wait(2);
if(b==0)
{
count--;
if(count>=1)
{
c=1;
myled =0;
}
else
{
c=0;
myled =1;
}
}
}
}