Sudip Mandal
/
SensorValueDisplay
getting values from sensor and display those values on LCD
Revision 0:266105102052, committed 2016-11-03
- Comitter:
- papuxtream
- Date:
- Thu Nov 03 06:44:28 2016 +0000
- Commit message:
- Getting values from sensor and display it on LCD
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Thu Nov 03 06:44:28 2016 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Thu Nov 03 06:44:28 2016 +0000 @@ -0,0 +1,21 @@ +#include "mbed.h" +#include "TextLCD.h" + + TextLCD lcd(p5,p6,p7,p8,p9,p10); + AnalogIn ldr(p15); + int main() + { + {lcd.cls(); + wait_ms(0.02); + lcd.locate(0,0); + lcd.printf("SENSOR OUTPUT VOLTAGE");} + +while(1) +{int ldr_value=ldr; + float voltage=ldr_value*(5.0/1023.0); + lcd.locate(1,1); + lcd.printf("%0.0f",voltage); + lcd.printf("Volt"); + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 03 06:44:28 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/4336505e4b1c \ No newline at end of file