as long as
switch is pressed LED will light on
Dependencies:
mbed
main.cpp
- Committer:
- ramsnpa
- Date:
- 2015-08-31
- Revision:
- 0:5f9eceeaf39d
File content as of revision 0:5f9eceeaf39d:
#include "mbed.h"
DigitalOut myled(LED1);
DigitalIn swi(PTA1);
int main() {
while(1) {
if (swi==1)
{
myled = 0;
wait(1);
}
else
myled =1;
}
}