dd

Dependencies:   BufferedSerial FastAnalogIn FastPWM mbed SHT75

Committer:
sbh9428
Date:
Fri Feb 19 07:07:26 2016 +0000
Revision:
0:9bfc4aea91e2
Child:
1:5c42ec7f1aeb
temp;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sbh9428 0:9bfc4aea91e2 1 /*
sbh9428 0:9bfc4aea91e2 2 * controlt.cpp
sbh9428 0:9bfc4aea91e2 3 *
sbh9428 0:9bfc4aea91e2 4 * Created on: 2016. 2. 19.
sbh9428 0:9bfc4aea91e2 5 * Author: sbh9428
sbh9428 0:9bfc4aea91e2 6 */
sbh9428 0:9bfc4aea91e2 7
sbh9428 0:9bfc4aea91e2 8 #include "controlt.h"
sbh9428 0:9bfc4aea91e2 9
sbh9428 0:9bfc4aea91e2 10 control_t::control_t() {
sbh9428 0:9bfc4aea91e2 11 // TODO Auto-generated constructor stub
sbh9428 0:9bfc4aea91e2 12
sbh9428 0:9bfc4aea91e2 13 }
sbh9428 0:9bfc4aea91e2 14
sbh9428 0:9bfc4aea91e2 15 control_t::control_t(temp_sensor_t* _temp_sensor, peltier_t* _peltier)
sbh9428 0:9bfc4aea91e2 16 {
sbh9428 0:9bfc4aea91e2 17 temp_sensor=_temp_sensor;
sbh9428 0:9bfc4aea91e2 18 peltier=_peltier;
sbh9428 0:9bfc4aea91e2 19 }
sbh9428 0:9bfc4aea91e2 20
sbh9428 0:9bfc4aea91e2 21 control_t::~control_t() {
sbh9428 0:9bfc4aea91e2 22 // TODO Auto-generated destructor stub
sbh9428 0:9bfc4aea91e2 23 }
sbh9428 0:9bfc4aea91e2 24
sbh9428 0:9bfc4aea91e2 25 float control_t::get_temp()
sbh9428 0:9bfc4aea91e2 26 {
sbh9428 0:9bfc4aea91e2 27 return temp_sensor->get_temp();
sbh9428 0:9bfc4aea91e2 28 }
sbh9428 0:9bfc4aea91e2 29
sbh9428 0:9bfc4aea91e2 30 void control_t::control_PWM(float PWM)
sbh9428 0:9bfc4aea91e2 31 {
sbh9428 0:9bfc4aea91e2 32 peltier->set_PWM(PWM);
sbh9428 0:9bfc4aea91e2 33 }
sbh9428 0:9bfc4aea91e2 34
sbh9428 0:9bfc4aea91e2 35 void control_t::control_temp()
sbh9428 0:9bfc4aea91e2 36 {
sbh9428 0:9bfc4aea91e2 37
sbh9428 0:9bfc4aea91e2 38
sbh9428 0:9bfc4aea91e2 39 }
sbh9428 0:9bfc4aea91e2 40
sbh9428 0:9bfc4aea91e2 41 void control_t::set_mode(int _mode)
sbh9428 0:9bfc4aea91e2 42 {
sbh9428 0:9bfc4aea91e2 43 mode=_mode;
sbh9428 0:9bfc4aea91e2 44 }