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:
- dq14
- Date:
- 2016-09-29
- Revision:
- 0:4f1a7b411fbb
File content as of revision 0:4f1a7b411fbb:
#include "mbed.h"
DigitalOut myled(LED1);
DigitalOut myled2(PA_6);
DigitalIn mybutton(USER_BUTTON);
DigitalIn mybutton2(PA_7);
int main()
{
printf("Velkomen/r/n");
mybutton2.mode(PullDown);
while(1)
{
if(mybutton2 == 1) //Chk if button is pushed
{ myled2 = 1; // LED on PA_6 is ON
}
else
{ myled2 = 0; //LED on PA_6 if OFF
}
}
}