Za lovrica

Dependencies:   AM2320 INPUTS OUTS TextLCD mbed

Files at this revision

API Documentation at this revision

Comitter:
Paaranoja
Date:
Sat Jan 21 16:00:11 2017 +0000
Commit message:
seminarski

Changed in this revision

AM2320.lib Show annotated file Show diff for this revision Revisions of this file
INPUTS.lib Show annotated file Show diff for this revision Revisions of this file
OUTS.lib Show annotated file Show diff for this revision Revisions of this file
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/AM2320.lib	Sat Jan 21 16:00:11 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/yasuyuki/code/AM2320/#766868b34d56
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/INPUTS.lib	Sat Jan 21 16:00:11 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/Paaranoja/code/INPUTS/#2abe3b8113cc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/OUTS.lib	Sat Jan 21 16:00:11 2017 +0000
@@ -0,0 +1,1 @@
+https://developer.mbed.org/users/Paaranoja/code/OUTS/#ffef1cca62a8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TextLCD.lib	Sat Jan 21 16:00:11 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/simon/code/TextLCD/#308d188a2d3a
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Sat Jan 21 16:00:11 2017 +0000
@@ -0,0 +1,38 @@
+#include "mbed.h"
+#include "AM2320.h"
+#include "OUTS.h"
+#include "INPUTS.h"
+//#include "TextLCD.h"
+
+Timer t;
+
+AM2320 senzor (PB_9, PB_8);
+OUTS izlazi (PC_10, PC_12, PC_1, PC_0);
+INPUTS ulazi (PC_2, PC_3);
+Serial pc(USBTX, USBRX);
+//TextLCD lcd (A0,A1,A2,A3,A4,A5);
+
+
+
+int main() {
+    
+    float trazena_temperatura, trazena_vlaga, senzor_vlaga, senzor_temperatura;
+    t.start();
+    while (true) {
+        
+        trazena_temperatura = ulazi.get_temp_req();
+        trazena_vlaga = ulazi.get_hum_req();
+        senzor_vlaga = (float)senzor.humidity()/10;
+        senzor_temperatura = (float)senzor.temperature()/10;
+        izlazi.outs_on(senzor_temperatura, senzor_vlaga, trazena_temperatura, trazena_vlaga);
+        
+        if (t.read()>2){
+            
+            pc.printf("Trazena temperatura: %.1f C\nTrazena vlaga: %.1f %%RH\n\n", trazena_temperatura, trazena_vlaga);
+            pc.printf("Trenutna temperatura: %.1f C\nTrenutna vlaga: %.1f %%RH\n_____________________________________________\n", senzor_temperatura, senzor_vlaga);
+            t.reset();
+        }
+        
+        
+    }
+}
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Sat Jan 21 16:00:11 2017 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/9baf128c2fab
\ No newline at end of file