22 Micro OLED Display Icon
33 Nathan Seidle @ SparkFun Electronics
44 Original Creation Date: November 15, 2020
5-
6- Draw a variable sized icon anywhere on the display. This is helpful
5+
6+ Draw a variable sized icon anywhere on the display. This is helpful
77 when you need a icon (GPS, battery, etc) on a certain part of the screen.
88
99 This example assumes an I2C connection (Qwiic)
10-
11- This code is beerware; if you see me (or any other SparkFun
12- employee) at the local, and you've found our code helpful,
10+
11+ This code is beerware; if you see me (or any other SparkFun
12+ employee) at the local, and you've found our code helpful,
1313 please buy us a round!
14-
14+
1515 Distributed as-is; no warranty is given.
1616*/
1717#include < Wire.h>
@@ -80,6 +80,13 @@ void setup()
8080 delay (100 );
8181 Serial.println (" Display Icon OLED example" );
8282
83+ // Some unbranded displays seem to need a reset before they can be detected successfully:
84+ pinMode (PIN_RESET, OUTPUT);
85+ digitalWrite (PIN_RESET, LOW);
86+ delay (100 );
87+ digitalWrite (PIN_RESET, HIGH);
88+ delay (100 );
89+
8390 // 0x3D is default address on Qwiic board
8491 if (isConnected (0x3D ) == true || isConnected (0x3C ) == true )
8592 {
@@ -136,4 +143,4 @@ bool isConnected(uint8_t deviceAddress)
136143 if (Wire.endTransmission () == 0 )
137144 return true ;
138145 return false ;
139- }
146+ }
0 commit comments