Plant Monitoring Project
Dependencies: mbed SHT21_ncleee WakeUp SSD1306 DHT Adafruit_TCS34725 DS1820
Diff: main.hh
- Revision:
- 30:0a25c02e25d9
- Parent:
- 26:5d38b3abb89a
- Child:
- 31:45f4bfde0b9a
--- a/main.hh Tue Dec 03 15:36:50 2019 +0000 +++ b/main.hh Wed Dec 11 17:26:05 2019 +0000 @@ -6,6 +6,8 @@ #include "SHT21_ncleee.h" #include "Adafruit_TCS34725.h" #include "ssd1306.h" +#include "standard_font.h" +#include "bold_font.h" #define DUREE_OFF 10 // Durée en seconde entre deux mesures #define DUREE_ECRAN_ON 5 // Durée en seconde d'éveil de l'écran @@ -23,17 +25,19 @@ Serial wisol(D1,D0); #endif -I2C i2c(I2C_SDA, I2C_SCL); +I2C i2c_1(I2C_SDA, I2C_SCL); +I2C i2c_2(D12,A6); #ifdef OLED -SSD1306 oled(D12, A6); +// D6 D9 D10 A4 D2 +SSD1306 oled(PB_1, PA_8, PA_11, PA_5, PA_12); #endif -InterruptIn bouton(D10); +InterruptIn bouton(A2); // Capteurs #ifdef FLOOR_TEMPERATURE -DS1820 DS(D2); // temperature sol +DS1820 DS(A3); // temperature sol #endif #ifdef FLOOR_HUMIDITY @@ -41,11 +45,11 @@ #endif #ifdef AIR_PARAMETERS -SHT21 sht(&i2c); // humidité + température air +SHT21 sht(&i2c_1); // humidité + température air #endif #ifdef RGB -Adafruit_TCS34725 RGBsens = Adafruit_TCS34725(&i2c, TCS34725_INTEGRATIONTIME_154MS, TCS34725_GAIN_1X); // RGB +Adafruit_TCS34725 RGBsens = Adafruit_TCS34725(&i2c_2, TCS34725_INTEGRATIONTIME_154MS, TCS34725_GAIN_1X); // RGB #endif // Fonctions