Programa para testes

Dependencies:   mbed

Revision:
17:daa4ab0790ed
Parent:
15:544ab0319bc6
Child:
18:fd0356641437
diff -r 544ab0319bc6 -r daa4ab0790ed main.cpp
--- a/main.cpp	Tue Mar 03 05:22:47 2015 -0300
+++ b/main.cpp	Thu Mar 05 11:39:56 2015 +0000
@@ -2,17 +2,63 @@
 
 DigitalOut myled(LED1);
 
-void pisca()
+void pisca(float tempo)
 {
     myled = 1;
-    wait(0.5);
-    myled = 1;
+    wait(tempo);
+    myled = 0;
+}
+
+void piscaCurto()
+{
+    pisca(0.3);
+}
+
+void piscaLongo()
+{
+    pisca(0.6);
+}
+
+void pausa(float tempo)
+{
+    wait(tempo);
+}
+
+void pausaCurta()
+{
+    pausa(0.3);
+}
+
+void pausaLonga()
+{
+    pausa(0.6);
 }
 
 int main() {
     while(1) {
-        pisca();
-        wait(0.3);
+        piscaCurto();
+        pausaCurta();
+        piscaCurto();
+        pausaCurta();
+        piscaCurto();
+
+        pausaLonga();
+
+        piscaLongo();
+        pausaCurta();
+        piscaLongo();
+        pausaCurta();
+        piscaLongo();
+
+        pausaLonga();
+
+        piscaCurto();
+        pausaCurta();
+        piscaCurto();
+        pausaCurta();
+        piscaCurto();
+
+        wait(1);
     }
 }