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
Revision 0:65488f8d255b, committed 2017-11-03
- Comitter:
- anderibabe
- Date:
- Fri Nov 03 14:23:34 2017 +0000
- Commit message:
- Pr?ctica 2 Ejercicio 5
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 Nov 03 14:23:34 2017 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+
+Ticker Sw1; // Switch1 para cambiar el estado de los led
+
+DigitalOut Led1(PB_3); // Led1 conectado al pin D3
+DigitalOut Led2(PB_5); // Led2 conectado al pin D4
+DigitalOut Led3(PB_4); // Led3 conectado al pin D5
+
+void recur ()
+{
+ Led1=!Led1;
+ Led2=!Led2;
+ Led3=!Led3;
+}
+
+
+
+int main()
+{
+Sw1.attach(&recur, 1);
+ while(1) {
+ sleep ();
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Nov 03 14:23:34 2017 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/fb8e0ae1cceb \ No newline at end of file