I have a sketch that writes a temperature to an OLED using the U8G Library.
is the delay in the loop required ? I don't like wasted idle time and thinking I may be able to use millis as I'm also going to introduce button signals into the loop.
void loop(void) {
// THIS STARTS THE PICTURE LOOP
u8g2.firstPage();
do {
draw();
} while( u8g2.nextPage() );
// Read Temperature
temperature = sensors.getTempCByIndex(0);
// Update the sensor readings
sensors.requestTemperatures();
dtostrf(temperature, 2, 2, temperatureString);
// rebuild the picture after some delay
delay(1000);
}