IOP / Mbed 2 deprecated AnalogIn_HelloWorld_WIZwiki-W7500

Dependencies:   mbed

Fork of AnalogIn_HelloWorld_WIZwiki-W7500 by Lawrence Lee

Files at this revision

API Documentation at this revision

Comitter:
IOP
Date:
Tue Aug 04 06:46:01 2015 +0000
Parent:
5:97fa889845b0
Child:
7:6b50af097b44
Commit message:
pin porting changed and med-src -> mbed

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Fri Jul 24 01:48:17 2015 +0000
+++ b/main.cpp	Tue Aug 04 06:46:01 2015 +0000
@@ -3,17 +3,14 @@
 #include "mbed.h"
 
 // Initialize a pins to perform analog input and digital output fucntions
-DigitalOut shield_led_off(D10);     // LED_GREEN on easy module shield
 AnalogIn   ain(A0);     
-DigitalOut myled_R(D9);             // LED_RED on easy module shield
+DigitalOut myled_R(LED_RED);             // LED_RED on WIZwiki-W7500
 
 int main(void)
-{
-    shield_led_off = 0;     // turn off Green LED on shield
-    
+{   
     while (1) {
     
-        // If greater than 0.4 * VCC set the digital pin
+        // If greater than 0.5 * VCC set the digital pin
         //  to a logic 1 otherwise a logic 0
         if(ain > 0.5f) {
             myled_R = 1;      // Red LED ON
@@ -22,6 +19,7 @@
         }
         
         // output the voltage and analog values
+        printf("======================\r\n");
         printf("voltage value : %3.3f\r\n", ain.read()*3.3f);
         printf("analog value : %3.3f\r\n", ain.read());
         wait(1.0);
--- a/mbed.bld	Fri Jul 24 01:48:17 2015 +0000
+++ b/mbed.bld	Tue Aug 04 06:46:01 2015 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/da0ca467f8b5
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/bad568076d81
\ No newline at end of file