THE CODE
THE CODE
// define device I2C address: 0x76 or 0x77 (0x77 is the library default address)
#define BMP280_I2C_ADDRESS 0x76
void setup(void)
{
dht.begin(); // synchronizing DHT sensor
tft.initR(INITR_144GREENTAB); // initialize a ST7735S
chip, black tab
tft.fillScreen(ST77XX_BLACK); // setting black background
tft.drawFastHLine(0, 15 , tft.width(), ST77XX_CYAN);// draw horizontal
seperation line at position (0, 15)
// main loop
void loop()
{
char _buffer[8];
// read temperature, humidity and pressure from the BMP280 sensor
float temp = bmp280.readTemperature(); // get temperature in °C
float hum = dht.readHumidity(); // get humidity in rH%
float pres = bmp280.readPressure(); // get pressure in hPa