projet3_temperature/lib/MesureADC/MesureADC.h
2020-05-13 15:59:24 +02:00

64 lines
1.0 KiB
C++

//
// MesureADC.h
// libLTC
//
// Created by Tim THUREL on 04/03/2020.
// Copyright © 2020 Tim THUREL. All rights reserved.
//
#ifndef MesureADC_h
#define MesureADC_h
#include <stdint.h>
#include <Arduino.h>
#include "LTC2439.h"
#define DEBUG
class MesureADC
{
public:
MesureADC(int vref,int maxval,int res_mesure,int v_alim, int beta, int r_therm );
float * ReadTemp(int adcCS); // renvoie l'adresse d'un tableau de température
// !!! Attention !!! bien vider le tableau dans un autre tableau si vous utilisez plusieurs ADC.
private:
float mesureI(float *table);
void temp();
void res();
void volt();
void mesureV(int CS);
int vreference;
int maximumval;
int res_courant;
int tention_alim;
int beta_therm;
int res_therm;
float i1;
float i2;
float tableV1[8];
float tableV2[8];
float tableVR1[8];
float tableVR2[8];
float tableR1[8];
float tableR2[8];
float T1[8];
float T2[8];
float out[16];
};
#endif /* MesureADC.h */