45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
#include "MesureADC.h"
|
|
|
|
#define vref 1650
|
|
#define maxval 32766
|
|
#define res_mesure 1000 // valeur de la résistance de mesure de courant
|
|
#define v_alim 3300 // Tention d'alim en mV
|
|
#define beta 3380 // Beta de la thermistance
|
|
#define r_therm 10000 // valeur de la thermistance a 25°C
|
|
|
|
MesureADC LTCMes(vref,maxval,res_mesure,v_alim,beta,r_therm);
|
|
|
|
void setup() {
|
|
Serial.begin(115200);
|
|
}
|
|
|
|
void loop() {
|
|
float *pointtemp = LTCMes.ReadTemp(10);
|
|
float temp[16];
|
|
float temp1[16];
|
|
for(int i = 0; i < 16;i++){
|
|
temp[i] = pointtemp[i];
|
|
}
|
|
pointtemp = LTCMes.ReadTemp(9);
|
|
for(int i = 0; i < 16;i++){
|
|
temp1[i] = pointtemp[i];
|
|
}
|
|
for(int j = 0; j < 16; j++){
|
|
Serial.print("T");
|
|
Serial.print(j+1);
|
|
Serial.print(" = ");
|
|
Serial.print(temp[j]);
|
|
Serial.print(" C ");
|
|
}
|
|
Serial.println("");
|
|
for(int j = 0; j < 16; j++){
|
|
Serial.print("T");
|
|
Serial.print(j+17);
|
|
Serial.print(" = ");
|
|
Serial.print(temp1[j]);
|
|
Serial.print(" C ");
|
|
}
|
|
Serial.println("");
|
|
Serial.println("");
|
|
}
|