Temp36 HelloWorld Example for WIZwiki-W7500
Dependencies: mbed
Fork of AnalogIn_HelloWorld_WIZwiki-W7500 by
Diff: main.cpp
- Revision:
- 2:5f564266c94f
- Parent:
- 0:101a12a915c6
- Child:
- 3:abab0082e271
--- a/main.cpp Wed Dec 10 16:19:08 2014 -0600 +++ b/main.cpp Thu Jul 02 06:32:51 2015 +0000 @@ -26,15 +26,15 @@ // test the voltage on the initialized analog pin // and if greater than 0.3 * VCC set the digital pin // to a logic 1 otherwise a logic 0 - if(ain > 0.3f) { + if(ain > 0.5f) { dout = 1; } else { dout = 0; } // print the percentage and 16 bit normalized values - printf("percentage: %3.3f%%\n", ain.read()*100.0f); - printf("normalized: 0x%04X \n", ain.read_u16()); - wait(0.2f); + printf("percentage: %3.3f%%\r\n", ain.read()*100.0f); + printf("analog value : %3.3f\r\n", ain.read()); + wait(1.0); } }