#include #include //****************************************************************************************// // Constante de temps et broches de connexion des capteurs // //****************************************************************************************// const int pause_affichage_ms = 100; // temps de pause d'affichage en milliseconde #define TDS_Sensor_Pin_Num A2 // TDS sensor on Analog pin A2 #define Turbidity_Sensor_Pin_Num A3 // Turbidity sensor on Analog pin A3 #define pH_Sensor_Pin_Num A4 // pH sensor on Analog pin A4 #define DS18S20_Pin_Num_v2 D2 // DS18B20 sensor on digital pin D2 <======= Informations des connexions #define DHT_Sensor_Pin_Num D6 // DHT on Digital pin D6 #define LED_Pin_Num D7 // LED on Digital pin D7 //****************************************************************************************// // Données pour le capteur pH meter ==> site DFRobot const int numMeasure = 10; char pH_str[8]; float offset_pH = 0; // valeur standard = -1.8 avec la carte pH alimentée en 3.3V et -2.5 avec carte alimentée en 5V // Configuration de l'afficheur SSD1315 U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(/* rotation=*/ U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); //Low spped I2C /* U8g2lib Example Overview: Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards. U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only. */ void get_pH() { int buf[10],temp; for(int i=0;ibuf[j]) { temp=buf[i]; buf[i]=buf[j]; buf[j]=temp; } } } unsigned long int sumValue = 0; //Store the average value of the sensor feedback for(int i=2;i