Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
OUTS.cpp
00001 #include "mbed.h" 00002 #include "OUTS.h" 00003 00004 00005 00006 OUTS::OUTS(PinName grijac_pin, PinName atomizer_pin, PinName grijac_led_pin, PinName atomizer_led_pin):grijac(grijac_pin), atomizer(atomizer_pin), led_grijac(grijac_led_pin), led_atomizer(atomizer_led_pin){ 00007 grijac = 0; 00008 atomizer = 0; 00009 led_atomizer = 0; 00010 led_grijac = 0; 00011 } 00012 00013 void OUTS::outs_on(float senzor_temp, float senzor_hum, float pot_temp, float pot_hum){ 00014 chk_temp(senzor_temp, pot_temp); 00015 chk_hum(senzor_hum, pot_hum); 00016 } 00017 00018 void OUTS::chk_temp(float senzor_temp, float pot_temp){ 00019 if (pot_temp>senzor_temp){ 00020 grijac = 1; 00021 led_grijac = 1; 00022 }else { 00023 grijac = 0; 00024 led_grijac = 0; 00025 } 00026 } 00027 void OUTS::chk_hum(float senzor_hum, float pot_hum){ 00028 if (pot_hum>senzor_hum){ 00029 atomizer = 1; 00030 led_atomizer = 1; 00031 } else { 00032 atomizer = 0; 00033 led_atomizer = 0; 00034 } 00035 }
Generated on Sat Jul 16 2022 14:22:55 by
1.7.2