Heater files
Dependents: LEX-Demo-Firmware-Logging LEX-Demo-Firmware-Logging
Heater.h
- Committer:
- omatthews
- Date:
- 2019-07-17
- Revision:
- 2:7f15386fcc90
- Parent:
- 1:4435d407d827
- Child:
- 3:313711a66929
- Child:
- 7:59ece353eea2
File content as of revision 2:7f15386fcc90:
/*------------------------------------------------------------------------------ Library header file for heater operations Date: 16/07/2018 ------------------------------------------------------------------------------*/ #ifndef Heater_H #define Heater_H #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 { public: /** Constructor * @param MOSI SPI pin * @param MISO SPI pin * @param SCLK SPI pin * @param nCS SPI pin * @param ADC reset pin * @param Conv chA pin * @param Conv chB pin * @param Conv chC pin * @param Conv chD pin */ Heater(int i_port, int v_port, DigitalOut drive, float R_set = 1); //Public member functions void read(); void hold(int hold_time); //Getters and setters void Set_R_set(float R); int Get_i(); int Get_v(); float Get_R(); void turn_on(); void turn_off(); protected: int curr; int v; float R; float R_set; int i_port; int v_port; DigitalOut drive; }; #endif