The example program for mbed pin-compatible platforms

Revision:
25:966cef6183e9
Parent:
24:7f14b70fc9ef
--- a/main.cpp	Mon Apr 08 11:03:25 2019 +0100
+++ b/main.cpp	Thu Feb 06 21:01:26 2020 +0000
@@ -1,12 +1,39 @@
 #include "mbed.h"
 
-DigitalOut myled(LED1);
+
+
+DigitalOut RedLed(LED1);
+DigitalOut GreenLed(LED2);
+DigitalOut BlueLed(LED3);
+int main() {
 
-int main() {
+Serial pc(USBTX, USBRX); // tx, rx
+
+
+
+
+    RedLed =1;
+    GreenLed = 1;
+    BlueLed = 1;
+    
     while(1) {
-        myled = 1;
-        wait(0.2);
-        myled = 0;
-        wait(0.2);
+
+    pc.printf("Hello World!\n\r");
+
+
+        RedLed = 0;
+        wait(0.5);
+        RedLed = 1;
+        wait(1);
+        
+        GreenLed=0;
+        wait(2);
+        GreenLed=1;
+        wait(1);
+        
+        BlueLed = 0;
+        wait(0.5);
+        BlueLed = 1;
+        wait(1);
     }
 }