This program exercises many of the peripherials including serial communication (prints bargraph on screen), as well as pushbutton (SW1 and SW2) and led red/blue usage. Based on Freescale program: frdm_helloworld, see http://developer.mbed.org/teams/Freescale/code/frdm_helloworld/?platform=FRDM-K64F REVISIONS: PC.BAUD = 115200-FAST, ADDED MSG STRINGS

Dependencies:   mbed

/media/uploads/strain11/inicial1.jpg /media/uploads/strain11/drawing11.jpg

Revision:
1:5b588cbaccae
Parent:
0:87236080673f
Child:
2:4601839c95d1
diff -r 87236080673f -r 5b588cbaccae main.cpp
--- a/main.cpp	Sun Mar 22 19:08:17 2015 +0000
+++ b/main.cpp	Sun Mar 22 21:16:41 2015 +0000
@@ -7,6 +7,8 @@
 InterruptIn sw1(PTA4);
 Serial pc(USBTX, USBRX);
 //==============================================================
+
+//==============================================================
  char contador ; 
  int temp_led;  
  //int i;
@@ -84,12 +86,41 @@
     led_3 = 0;
     pc.printf("LED BLUE ON [TWO SECONDS]"); 
     pc.printf("\n");
-    
-        for(int i=0 ; i<=42 ; i++)
+        
+        pc.printf("W");
+        wait(2.0/40);
+        pc.printf("A");
+        wait(2.0/40);
+        pc.printf("I");
+        wait(2.0/40);
+        pc.printf("T");
+        wait(2.0/40);
+        pc.printf(" ");
+        wait(2.0/40);
+        pc.printf("2");
+        wait(2.0/40);
+        pc.printf(" ");
+        wait(2.0/4);
+        pc.printf("S");
+        wait(2.0/43);
+        pc.printf("E");
+        wait(2.0/43);
+        pc.printf("C");
+        wait(2.0/43);
+        pc.printf("O");
+        wait(2.0/43);
+        pc.printf("N");
+        wait(2.0/43);
+        pc.printf("D");
+        wait(2.0/43);
+        pc.printf("S");
+        wait(2.0/43);
+        
+        for(char i=0 ; i<=25 ; i++)
     {
-        pc.printf(":");
+        pc.printf(".");
            
-        wait(2.0/43);
+        wait(2.0/40);
     }
     pc.printf("\n");
     pc.printf("===========================================\n");
@@ -109,6 +140,8 @@
 int main()
 
 {
+    
+    pc.baud(115200);
     led_3 = 1;
     wait(2.0);
     pc.printf("-------------------------------------------\n");