Program for the AZ3166 IOT Kit with the EMW3166 module on it

Files at this revision

API Documentation at this revision

Comitter:
appa
Date:
Wed Feb 03 02:29:25 2021 +0000
Parent:
2:205eea681593
Commit message:
renamed main.cpp

Changed in this revision

Main.cpp Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 205eea681593 -r fd8df8c792b1 Main.cpp
--- a/Main.cpp	Tue Feb 02 19:56:28 2021 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-#include "mbed.h"
-#include "platform/mbed_thread.h"
-#include "RPinName.h"
-
-// Blinking rate in milliseconds
-#define loopdelay    1000
-#define betweenleds 500
-
-
-int main()
-{
-
-    // Initialise the digital pins for LEDs as an output
-    DigitalOut ledg(led1);  // WiFi or same as LED1
-    DigitalOut ledb(led2);  // Azure
-    DigitalOut ledy(led3);  // User
-    
-    // Initialise the pulse-width-moudulation for RGB LED
-    PwmOut RGBR(RedRGB);
-    PwmOut RGBG(GreenRGB);
-    PwmOut RGBB(BlueRGB);
-    
-    Serial AZ(tx, rx); // tx, rx
-    
-    while (true) {
-        AZ.printf("Hi There from Appa\r\n");
-        
-        RGBR = 0;
-        AZ.printf("Random Green RGB LED\r\n");
-        RGBG = rand() % 100;
-        AZ.printf("Not Green LED\r\n");
-        ledg = !ledg;
-        thread_sleep_for(betweenleds);
-        RGBG = 0;
-        AZ.printf("Random Blue RGB LED\r\n");
-        RGBB = rand() % 100;
-        AZ.printf("Not Blue LED\r\n");
-        ledb = !ledb;
-        thread_sleep_for(betweenleds);
-        RGBB = 0;
-        AZ.printf("Random Red RGB LED\r\n");
-        RGBR = rand() % 100;
-        AZ.printf("Not Red LED\r\n");
-        ledy = !ledy;
-        thread_sleep_for(loopdelay);
-    }
-}
\ No newline at end of file
diff -r 205eea681593 -r fd8df8c792b1 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Feb 03 02:29:25 2021 +0000
@@ -0,0 +1,47 @@
+#include "mbed.h"
+#include "platform/mbed_thread.h"
+#include "RPinName.h"
+
+// Blinking rate in milliseconds
+#define loopdelay    1000
+#define betweenleds 500
+
+
+int main()
+{
+
+    // Initialise the digital pins for LEDs as an output
+    DigitalOut ledg(led1);  // WiFi or same as LED1
+    DigitalOut ledb(led2);  // Azure
+    DigitalOut ledy(led3);  // User
+    
+    // Initialise the pulse-width-moudulation for RGB LED
+    PwmOut RGBR(RedRGB);
+    PwmOut RGBG(GreenRGB);
+    PwmOut RGBB(BlueRGB);
+    
+    Serial AZ(tx, rx); // tx, rx
+    
+    while (true) {
+        AZ.printf("Hi There from Appa\r\n");
+        
+        RGBR = 0;
+        AZ.printf("Random Green RGB LED\r\n");
+        RGBG = rand() % 100;
+        AZ.printf("Not Green LED\r\n");
+        ledg = !ledg;
+        thread_sleep_for(betweenleds);
+        RGBG = 0;
+        AZ.printf("Random Blue RGB LED\r\n");
+        RGBB = rand() % 100;
+        AZ.printf("Not Blue LED\r\n");
+        ledb = !ledb;
+        thread_sleep_for(betweenleds);
+        RGBB = 0;
+        AZ.printf("Random Red RGB LED\r\n");
+        RGBR = rand() % 100;
+        AZ.printf("Not Red LED\r\n");
+        ledy = !ledy;
+        thread_sleep_for(loopdelay);
+    }
+}
\ No newline at end of file