Temp36 HelloWorld Example for WIZwiki-W7500

Dependencies:   mbed

Fork of AnalogIn_HelloWorld_WIZwiki-W7500 by IOP

Files at this revision

API Documentation at this revision

Comitter:
IOP
Date:
Wed Feb 03 07:29:45 2016 +0000
Parent:
7:63e969ecd4ac
Commit message:
update mbed lib

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	Wed Jan 06 23:55:17 2016 +0000
+++ b/main.cpp	Wed Feb 03 07:29:45 2016 +0000
@@ -3,17 +3,17 @@
 #include "mbed.h"
 
 // Initialize a pins to perform analog input fucntions
-AnalogIn   ain(A0); // connect A0(WIZwiki-W7500) to Vout(Temp36)
+AnalogIn   ain(A0);             // connect A0(WIZwiki-W7500) to Vout(Temp36)
 
 int main(void)
 {
     while (1)
     {
-        float V = ain.read() * 3.3;           // connect Vs(Temp36) to 3.3V(WIZwiki-W7500) 
-        //float V = ain.read() * 5;           // connect Vs(Temp36) to 5V(WIZwiki-W7500)
+        float V = ain.read() * 3.3;             // connect Vs(Temp36) to 3.3V(WIZwiki-W7500) 
+        //float V = ain.read() * 5;             // connect Vs(Temp36) to 5V(WIZwiki-W7500)
         
-        float tempC = (V-0.5) * 100;          // calculate temperature C
-        float tempF = (tempC * 9 / 5) + 32.0; // calculate temperature F
+        float tempC = (V - 0.5) * 100;          // calculate temperature C
+        float tempF = (tempC * 9 / 5) + 32.0;   // calculate temperature F
         
         printf("tempC value : %5.2f C \r\n", tempC);
         printf("tempF value : %5.2f F \r\n", tempF);
--- a/mbed.bld	Wed Jan 06 23:55:17 2016 +0000
+++ b/mbed.bld	Wed Feb 03 07:29:45 2016 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c
\ No newline at end of file
+http://mbed.org/users/mbed_official/code/mbed/builds/6f327212ef96
\ No newline at end of file