Commit 3d07b8ba authored by Maxime Robin's avatar Maxime Robin

mesure SHT75 bonne bibliothèque

parent 0d7ed02c
......@@ -30,7 +30,6 @@
#include <Adafruit_MAX31856.h>
#include <SPI.h>
#include <MAX31865.h>
#include <SHTSensor.h>
#include <Sensirion.h>
#include <I2CEEPROM.h>
#include <TimerOne.h>
......@@ -69,7 +68,12 @@ Adafruit_MAX31856 maxThermocouple = Adafruit_MAX31856(10, 11, 12, 13);
MAX31865_RTD maxPT100( MAX31865_RTD::RTD_PT100, RTD_CS_PIN );
// SHT 75
SHTSensor sht75;
const uint8_t dataPin = 2;
const uint8_t clockPin = 3;
float temperature;
float humidity;
float dewpoint;
Sensirion sht75 = Sensirion(dataPin, clockPin);
// 24LC512 - mémoire flash
I2CEEPROM i2c_eeprom(CHIP_ADDRESS); // Create I2C EEPROM instance
......@@ -261,13 +265,16 @@ void mesureGirouette() {
void mesureSHT75() {
Serial.println("Entree mesure SHT75");
sht75.readSample();
sht75.measure(&temperature, &humidity, &dewpoint);
lcd.setCursor(0,0); lcd.print("T=");
lcd.setCursor(2,0); lcd.print(sht75.getTemperature());
lcd.setCursor(8,0); lcd.print("degC");
lcd.setCursor(0,1); lcd.print("Hum=");
lcd.setCursor(4,1); lcd.print(sht75.getHumidity());
lcd.setCursor(12,1); lcd.print("%");
lcd.setCursor(2,0); lcd.print(temperature);
lcd.setCursor(7,0); lcd.print(" C; H=");
lcd.setCursor(13,0); lcd.print(humidity);
lcd.setCursor(15,0); lcd.print("%");
lcd.setCursor(0,1); lcd.print("Dewpt=");
lcd.setCursor(6,1); lcd.print(dewpoint);
lcd.setCursor(12,1); lcd.print(" C");
}
/**
* =========== F I N MESURES ===============
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment