DASD
INPUTS.cpp
- Committer:
- Paaranoja
- Date:
- 2017-01-21
- Revision:
- 0:2abe3b8113cc
File content as of revision 0:2abe3b8113cc:
#include "mbed.h" #include "INPUTS.h" INPUTS::INPUTS (PinName pot_hum_pin, PinName pot_temp_pin): pot_vlaga(pot_hum_pin), pot_temp(pot_temp_pin){ get_hum_req(); get_temp_req(); } float INPUTS::get_hum_req(){ req_hum = pot_vlaga.read()*99; return req_hum; } float INPUTS::get_temp_req(){ req_temp = (15*pot_temp.read())+20; return req_temp; }