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 3:e6774bc9d98e, committed 2018-11-29
- Comitter:
- LeoPM
- Date:
- Thu Nov 29 03:53:22 2018 +0000
- Parent:
- 2:ad0b044d0a10
- Commit message:
- Contador con LCD;
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/P5_2_Contador_LCD.cpp Thu Nov 29 03:53:22 2018 +0000
@@ -0,0 +1,25 @@
+// Práctica 5 Ejercicio 2
+//Realice un programa que en un LCD visualice un contador ascendente que se incremente al produciruna interrupción.
+#include "mbed.h"
+#include "TextLCD.h"
+
+TextLCD lcd(D4,D5,A2,A3,A4,A5); // rs, e, d4-d7
+InterruptIn button(USER_BUTTON);
+void Accion(){
+ lcd.cls();
+ lcd.printf("*** 0 ****");wait(0.8);lcd.cls();
+ lcd.printf("*** 1 ***");wait(0.8);lcd.cls();
+ lcd.printf("*** 2 ***");wait(0.8);lcd.cls();
+ lcd.printf("*** 3 ***");wait(0.8);lcd.cls();
+ lcd.printf("*** 4 ***");wait(0.8);lcd.cls();
+ lcd.printf("*** 5 ***");wait(0.8);lcd.cls();
+ lcd.printf("*** 6 ***");wait(0.8);lcd.cls();
+ lcd.printf("*** 7 ***");wait(0.8);lcd.cls();
+ lcd.printf("*** 8 ***");wait(0.8);lcd.cls();
+ lcd.printf("*** 9 ***");wait(0.8);lcd.cls();
+}
+int main() {
+ while(1){
+ button.rise(&Accion);
+ }
+}
\ No newline at end of file
--- a/TextLCD.lib Sat Dec 04 11:31:07 2010 +0000 +++ b/TextLCD.lib Thu Nov 29 03:53:22 2018 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/simon/code/TextLCD/#e4cb7ddee0d3 +http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- a/main.cpp Sat Dec 04 11:31:07 2010 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-// Hello World! for the TextLCD
-
-#include "mbed.h"
-#include "TextLCD.h"
-
-TextLCD lcd(p15, p16, p17, p18, p19, p20); // rs, e, d4-d7
-
-int main() {
- lcd.printf("Hello World!\n");
-}
--- a/mbed.bld Sat Dec 04 11:31:07 2010 +0000 +++ b/mbed.bld Thu Nov 29 03:53:22 2018 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/e2ac27c8e93e +https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187 \ No newline at end of file