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.
Diff: main.cpp
- Revision:
- 3:3bd2bf8416c8
- Parent:
- 1:6554c60faa06
--- a/main.cpp Fri Jul 07 06:39:56 2017 +0000
+++ b/main.cpp Sun Apr 12 04:36:39 2020 +0000
@@ -1,13 +1,34 @@
#include "mbed.h"
-
-DigitalOut led(LED1);
-
+//led parpadeante
+DigitalOut led(LED2);
+DigitalIn push1(SW2);
+DigitalIn push2(SW3);
+Serial com1(USBTX,USBRX); // PARA USAR LOS PINES UART
int main()
{
- while(1) {
- led = 1; // LED is ON
- wait(0.2); // 200 ms
+
+ do {
+ led = 1; // LED is ON 1
+ wait(0.3); // 300 ms
led = 0; // LED is OFF
- wait(0.8); // 800 ms
- }
+ wait(0.3); //300 ms
+ led = 1; // 2
+ wait(0.3);
+ led = 0;
+ wait(0.3);
+ led = 1; //3
+ wait(0.3);
+ led = 0;
+ wait(0.3);
+ led = 1; //4
+ wait(0.3);
+ led = 0;
+ wait(0.3);
+ led = 1; // 5
+ wait(0.3);
+ led = 0;
+ wait(0.5);
+
+ }
+ while((push1==1)&&(push2==1));
}