Heater for threaded program

Dependents:   LEX_Threaded_Programming

Committer:
omatthews
Date:
Wed Jul 17 07:54:07 2019 +0000
Revision:
0:4e33cc8171f4
Child:
1:4435d407d827
First attempt to add in heater

Who changed what in which revision?

UserRevisionLine numberNew contents of line
omatthews 0:4e33cc8171f4 1 /*------------------------------------------------------------------------------
omatthews 0:4e33cc8171f4 2 Library header file for heater operations
omatthews 0:4e33cc8171f4 3 Date: 16/07/2018
omatthews 0:4e33cc8171f4 4
omatthews 0:4e33cc8171f4 5
omatthews 0:4e33cc8171f4 6 ------------------------------------------------------------------------------*/
omatthews 0:4e33cc8171f4 7
omatthews 0:4e33cc8171f4 8 #ifndef Heater_H
omatthews 0:4e33cc8171f4 9 #define Heater_H
omatthews 0:4e33cc8171f4 10 #include "mbed.h"
omatthews 0:4e33cc8171f4 11 #include "ADS8568_ADC.h"
omatthews 0:4e33cc8171f4 12
omatthews 0:4e33cc8171f4 13
omatthews 0:4e33cc8171f4 14 class Heater
omatthews 0:4e33cc8171f4 15 {
omatthews 0:4e33cc8171f4 16 public:
omatthews 0:4e33cc8171f4 17 /** Constructor
omatthews 0:4e33cc8171f4 18 * @param MOSI SPI pin
omatthews 0:4e33cc8171f4 19 * @param MISO SPI pin
omatthews 0:4e33cc8171f4 20 * @param SCLK SPI pin
omatthews 0:4e33cc8171f4 21 * @param nCS SPI pin
omatthews 0:4e33cc8171f4 22 * @param ADC reset pin
omatthews 0:4e33cc8171f4 23 * @param Conv chA pin
omatthews 0:4e33cc8171f4 24 * @param Conv chB pin
omatthews 0:4e33cc8171f4 25 * @param Conv chC pin
omatthews 0:4e33cc8171f4 26 * @param Conv chD pin
omatthews 0:4e33cc8171f4 27 */
omatthews 0:4e33cc8171f4 28 Heater(int i_port, int v_port, DigitalOut drive, float R_set = 1);
omatthews 0:4e33cc8171f4 29
omatthews 0:4e33cc8171f4 30 //Public member functions
omatthews 0:4e33cc8171f4 31
omatthews 0:4e33cc8171f4 32 void read_R();
omatthews 0:4e33cc8171f4 33 void hold(int hold_time);
omatthews 0:4e33cc8171f4 34 void Set_R_set(float R);
omatthews 0:4e33cc8171f4 35 float Get_R();
omatthews 0:4e33cc8171f4 36
omatthews 0:4e33cc8171f4 37
omatthews 0:4e33cc8171f4 38
omatthews 0:4e33cc8171f4 39
omatthews 0:4e33cc8171f4 40
omatthews 0:4e33cc8171f4 41 protected:
omatthews 0:4e33cc8171f4 42
omatthews 0:4e33cc8171f4 43
omatthews 0:4e33cc8171f4 44 float i;
omatthews 0:4e33cc8171f4 45 float v;
omatthews 0:4e33cc8171f4 46 float R;
omatthews 0:4e33cc8171f4 47 float R_set;
omatthews 0:4e33cc8171f4 48 int i_port;
omatthews 0:4e33cc8171f4 49 int v_port;
omatthews 0:4e33cc8171f4 50 DigitalOut drive;
omatthews 0:4e33cc8171f4 51
omatthews 0:4e33cc8171f4 52 };
omatthews 0:4e33cc8171f4 53
omatthews 0:4e33cc8171f4 54 #endif
omatthews 0:4e33cc8171f4 55