Skip to content

Commit f3ec993

Browse files
authored
Update Oled_Display.ino
1 parent 177173b commit f3ec993

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/Oled_Display/Oled_Display.ino

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ void setup() {
77
void loop() {
88
int random_value = random(0, 1023); //read value from A0
99

10-
Oled.clearBuffer(); // clear the internal memory
11-
Oled.setFont(u8g2_font_ncenB08_tr); // choose a suitable font
12-
Oled.setCursor(0, 10);
13-
Oled.print("Analog Value:"); // write something to the internal memory
14-
Oled.print(random_value); // print random value read from pin A0
15-
Oled.sendBuffer(); // transfer internal memory to the display
10+
Oled.setFont(u8x8_font_chroma48medium8_r);
11+
Oled.setCursor(0, 33);
12+
Oled.print("Temp: ");
13+
Oled.print(random_value);
14+
Oled.print("C");
15+
Oled.refreshDisplay();
1616
delay(1000);
1717
}

0 commit comments

Comments
 (0)