Za lovrica
Dependencies: AM2320 INPUTS OUTS TextLCD mbed
Revision 0:9fdb441f3664, committed 2017-01-21
- Comitter:
- Paaranoja
- Date:
- Sat Jan 21 16:00:11 2017 +0000
- Commit message:
- seminarski
Changed in this revision
diff -r 000000000000 -r 9fdb441f3664 AM2320.lib --- /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
diff -r 000000000000 -r 9fdb441f3664 INPUTS.lib --- /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
diff -r 000000000000 -r 9fdb441f3664 OUTS.lib --- /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
diff -r 000000000000 -r 9fdb441f3664 TextLCD.lib --- /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
diff -r 000000000000 -r 9fdb441f3664 main.cpp --- /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
diff -r 000000000000 -r 9fdb441f3664 mbed.bld --- /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