From b650cc69f79bc0547b89cae1cba55ef1eccda26f Mon Sep 17 00:00:00 2001 From: Patrik Jonsson Date: Fri, 1 Jan 2021 11:45:50 -1000 Subject: [PATCH] Use _delay_ms instead of delay. This way it works even if the timers have been changed from the Arduino settings. --- src/SFE_MicroOLED.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SFE_MicroOLED.cpp b/src/SFE_MicroOLED.cpp index 6583771..6e2927a 100644 --- a/src/SFE_MicroOLED.cpp +++ b/src/SFE_MicroOLED.cpp @@ -283,9 +283,9 @@ void MicroOLED::beginCommon() // Display reset routine pinMode(rstPin, OUTPUT); // Set RST pin as OUTPUT digitalWrite(rstPin, HIGH); // Initially set RST HIGH - delay(5); // VDD (3.3V) goes high at start, lets just chill for 5 ms + _delay_ms(5); // VDD (3.3V) goes high at start, lets just chill for 5 ms digitalWrite(rstPin, LOW); // Bring RST low, reset the display - delay(10); // wait 10ms + _delay_ms(10); // wait 10ms digitalWrite(rstPin, HIGH); // Set RST HIGH, bring out of reset // Display Init sequence for 64x48 OLED module