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 26:0d2df6a1ed26, committed 2020-04-15
- Comitter:
- montse
- Date:
- Wed Apr 15 20:42:25 2020 +0000
- Parent:
- 25:869f212440f8
- Commit message:
- Programa que enciende un led al presionar un boton
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Apr 11 10:52:53 2020 +0000
+++ b/main.cpp Wed Apr 15 20:42:25 2020 +0000
@@ -10,9 +10,16 @@
int main()
{
- while(boton1==1)
+ while(1)
{
- myled = 1;
+ if (boton1.read()==0)
+ {
+ myled=1;
+ }
+
+ else{
+ myled=0;
+ }
}
}