DASD

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers INPUTS.cpp Source File

INPUTS.cpp

00001 #include "mbed.h"
00002 #include "INPUTS.h"
00003 
00004 INPUTS::INPUTS (PinName pot_hum_pin, PinName pot_temp_pin): pot_vlaga(pot_hum_pin), pot_temp(pot_temp_pin){
00005    get_hum_req();
00006    get_temp_req();
00007     }
00008 
00009 float INPUTS::get_hum_req(){
00010    req_hum = pot_vlaga.read()*99;
00011    return req_hum;
00012     }
00013     
00014 float INPUTS::get_temp_req(){
00015     req_temp = (15*pot_temp.read())+20;
00016     return req_temp;
00017     }