}
void
loop
(
void
) {
TCA9548A(0);
float
temperature = bme.
readTemperature
();
float
pressure = bme.readPressure()/100;
float
humidity = bme.readHumidity();
TCA9548A(1);
u8g2
.
clearBuffer
();
u8g2_prepare();
u8g2
.
setFont
(
u8g2_font_6x10_tf
);
u8g2
.
drawStr
(0, 0,
"Temperature: "
);
u8g2
.
setCursor
(75, 0);
u8g2
.
(temperature);
u8g2
.
println
();
u8g2
.
drawStr
(0, 10,
"Pressure: "
);
u8g2
.
setCursor
(75, 10);
u8g2
.
(pressure);
u8g2
.
println
();
u8g2
.
drawStr
(0, 20,
"Humidity: "
);
u8g2
.
setCursor
(75, 20);
u8g2
.
(humidity);
u8g2
.
println
();
u8g2
.
sendBuffer
();
delay
(100);
}
- 17 -