Applied engineering Team
/
Mikroupravljaci_vjezba_8_5
Dinko Djakovic, Program putem LCD displeja ispisuje vrijednost ulaznog napona na pinu p17
Revision 0:e3ca89f1bce8, committed 2015-05-22
- Comitter:
- djdinko
- Date:
- Fri May 22 17:23:56 2015 +0000
- Commit message:
- LCD Voltmetar
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/TextLCD.lib Fri May 22 17:23:56 2015 +0000 @@ -0,0 +1,1 @@ +http://developer.mbed.org/users/wim/code/TextLCD/#d3496c3ea301
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri May 22 17:23:56 2015 +0000 @@ -0,0 +1,17 @@ +/* +Program mjeri ulazni napon na pinu p17 i ispisuje vrijednost napona na 16*1 LCD displeju +*/ + +#include "mbed.h" +#include "TextLCD.h" +TextLCD lcd(p19, p20, p21, p22, p23, p24,TextLCD::LCD8x2); +AnalogIn Ain(p17); +float percentage; +int main() { +while(1){ +percentage=Ain; +lcd.printf("Napon: %.2f V",percentage*3.3); +wait(0.06); +lcd.cls(); +} +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri May 22 17:23:56 2015 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/dbbf35b96557 \ No newline at end of file