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 7:f313fb383b37, committed 2020-04-24
- Comitter:
- akumagame
- Date:
- Fri Apr 24 23:13:33 2020 +0000
- Parent:
- 6:14523b016fd5
- Commit message:
- f
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Wed Apr 22 23:27:19 2020 +0000 +++ b/main.cpp Fri Apr 24 23:13:33 2020 +0000 @@ -3,29 +3,39 @@ Serial com1(USBTX, USBRX); -DigitalIn bot(PTA6); - - - int main() +DigitalIn bot(PTC6); - { - while(1) - + void boton(int bar) +{ + + if(bar==0) { - if(bot.read()== 0) - { - com1.printf("El boton esta siendo presionado"); + com1.printf("El boton esta siendo presionado\n"); } else { - com1.printf("El boton esta no esta siendo presionado" ); + com1.printf("El boton esta no esta siendo presionado\n" ); } - } + + } + + int main() + + { + while(1) + { + int x; + x = bot.read(); + boton(x); + + + + } }