Skip to content

Commit 5ef3d8e

Browse files
authored
remove reference to temp, Display on a correct line
I unfortunately wasted 1H trying to use the oled due to this example. Display lines need to be 9, 18, 27, 36, 45, 54 Using 33 is not good, it's an incorrect value that ends up in the wrong place, and gives the impression that you can give any Y coordinate, when in fact you cannot. If you don't, text gets overlayed on top of other text, even though it shouldn't according to Y See arduino-libraries#6 for an example.
1 parent 859bdf0 commit 5ef3d8e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/Oled_Display/Oled_Display.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ void loop() {
99
int random_value = random(0, 1023); // create a random value
1010

1111
Oled.setFont(u8x8_font_chroma48medium8_r);
12-
Oled.setCursor(0, 33);
13-
Oled.print("Temp: ");
14-
Oled.print(random_value);
15-
Oled.print("C");
12+
// Y needs to be a multiple of 9 for a font of 8 or the display
13+
// will end up in an incorrect place.
14+
Oled.setCursor(0, 27);
15+
Oled.print("Value: ");
16+
Oled.print(random_value)
1617
Oled.refreshDisplay();
1718
delay(1000);
1819
}

0 commit comments

Comments
 (0)