
necesitamos hacer que con una letra prendan los leds no con una gpio como hice en este codigo
Revision 0:e91b7d5124df, committed 2019-10-25
- Comitter:
- tanofgennaro
- Date:
- Fri Oct 25 03:01:23 2019 +0000
- Commit message:
- comit inicial;
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 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Oct 25 03:01:23 2019 +0000 @@ -0,0 +1,20 @@ +#include "mbed.h" + +DigitalIn gpo(PTD7); +DigitalOut led(LED_RED); +DigitalOut OUT(PTC12); + +int main() +{ + while (true) { + if (gpo==1) + { + led = 0; + OUT = 1; // toggle led + }else + { + led = 1; + OUT = 0; + } + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Oct 25 03:01:23 2019 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file