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 0:50d838bb5667, committed 2021-06-11
- Comitter:
- Zarandaja
- Date:
- Fri Jun 11 03:44:52 2021 +0000
- Commit message:
- Control de los LEDs en placa NXP LPC1768
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 Jun 11 03:44:52 2021 +0000
@@ -0,0 +1,24 @@
+/*Programa para control de LEDs en la placa
+rutina "hola mundo"*/
+
+#include "mbed.h"
+
+//configuración de los LEDs
+DigitalOut led1(LED1); //Activación LED1
+DigitalOut led2(LED2); //Activación LED2
+DigitalOut led3(LED3); //Activación LED3
+DigitalOut led4(LED4); //Activación LED4
+
+int main() {
+ while(1) {
+ //rutina
+ led1 = !led1; //encendido/apagado por negación de estado
+ wait(0.2); //Retardo de 2ms
+ led2 = !led2; //encendido/apagado por negación de estado
+ wait(0.2); //Retardo de 2ms
+ led3 = !led3; //encendido/apagado por negación de estado
+ wait(0.2); //Retardo de 2ms
+ led4 = !led4; //encendido/apagado por negación de estado
+ wait(0.2); //Retardo de 2ms
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Jun 11 03:44:52 2021 +0000 @@ -0,0 +1,1 @@ +https://os.mbed.com/users/mbed_official/code/mbed/builds/65be27845400 \ No newline at end of file