Dinko Djakovic, Program putem LCD displeja ispisuje vrijednost ulaznog napona na pinu p17

Dependencies:   TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
djdinko
Date:
Fri May 22 17:23:56 2015 +0000
Commit message:
LCD Voltmetar

Changed in this revision

TextLCD.lib Show annotated file Show diff for this revision Revisions of this file
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
--- /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