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.
Revision 0:1796418c9965, committed 2020-02-17
- Comitter:
- fpachays
- Date:
- Mon Feb 17 05:09:44 2020 +0000
- Commit message:
- Encender un led
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 1796418c9965 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Mon Feb 17 05:09:44 2020 +0000 @@ -0,0 +1,34 @@ +#include "mbed.h" + +// LED connected Pin PC_0 +DigitalOut led(PC_0); + +// Push-Button connected Pin PC_3 +DigitalIn pushButton(PC_3); + +// Main Loop runs in its own thread in the OS +int main() { + + // Active Pull-Up Resistor + pushButton.mode(PullUp); + + // Inifite Loop + while(1) { + + // Check Push-Button + if(pushButton == 0) { + + // LED Turn-On + led = 1; + + } else { + + // LED Turn-Off + led = 0; + } + } +} + + + +
diff -r 000000000000 -r 1796418c9965 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Mon Feb 17 05:09:44 2020 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file