Heater for threaded program
Dependents: LEX_Threaded_Programming_V3
Diff: Heater.h
- Revision:
- 1:4435d407d827
- Parent:
- 0:4e33cc8171f4
- Child:
- 2:7f15386fcc90
diff -r 4e33cc8171f4 -r 4435d407d827 Heater.h --- a/Heater.h Wed Jul 17 07:54:07 2019 +0000 +++ b/Heater.h Wed Jul 17 13:00:41 2019 +0000 @@ -10,6 +10,9 @@ #include "mbed.h" #include "ADS8568_ADC.h" +#define MEAS_DELAY 50 // measurement delay after turning on FET (us) +#define N_ROLL_AVG 10 // rolling average for R values +#define ALL_CH 15 //value of convst bus to read all chanels simultaneosly class Heater { @@ -31,20 +34,25 @@ void read_R(); void hold(int hold_time); + + void Set_R_set(float R); + float Get_R(); - + void turn_on(); + void turn_off(); protected: - float i; + float curr; float v; float R; float R_set; + int i_port; int v_port; DigitalOut drive;