run with easy module shield

Dependencies:   mbed

Fork of CDS_HelloWorld_WIZwiki-W7500 by IOP WIZnet

Revision:
4:9866fbe66750
Parent:
3:b4272b24707b
Child:
5:07cf6e09cd27
--- a/main.cpp	Fri Jul 10 06:34:28 2015 +0000
+++ b/main.cpp	Fri Jul 24 01:32:06 2015 +0000
@@ -1,8 +1,9 @@
 #include "mbed.h"
  
-DigitalOut redled(LED1); // RED
-DigitalOut blueled(LED3); // BLUE
-AnalogIn CDS(A0);
+DigitalOut myled_R(D9);     // LED_RED on easy module shield
+DigitalOut myled_G(D10);     // LED_GREEN on easy module shield  
+DigitalOut myled_B(D11);    // LED_BLUE on easy module shield
+AnalogIn CDS(A1);            // Analog Input Pin A1
  
 int main() {
     printf("Hello WizWIki-W7500!\n\r");
@@ -22,15 +23,17 @@
         printf("===========================================\n\r");
         
         wait(1);     
-        //Status is bright.
+        //Status is dark and RED LED ON, the others OFF
         if(CDS_data < 500){
-            redled = 1;
-            blueled = 0;
+            myled_R = 1;
+            myled_G = 0;
+            myled_B = 0;
         }
-        //Status is dark.
+        //Status is bright and BLUE LED ON, the others OFF
         else  {
-            redled = 0;
-            blueled = 1;
+            myled_R = 0;
+            myled_G = 0;
+            myled_B = 1;
         }
     }
 }
\ No newline at end of file