ssd1106 can't seem to get a degree symbol - Solved

I know this is not a new topic, and i have read the existing posts, but i still can't seem to get a degree symbol to work on my ssd1106 1.3" OLED.

i have tried the Adafruit library. I have tried u8g library. i have tried u8g2 library. i am using u8g for the font "display.setFont(&FreeSansBold24pt7b);" But it doesn't have a degree symbol. I have fadged a little circle and moved it to the right position, but as soon as the number changes, it is now in the wrong place.

u8g says don't use it anymore, use u8g2. but i can't find ssd1106 i2c in the list of displays.

i have tried " Serial.print(char(176));
display.write(223);
display.print((char)223);

for some reason it decided i was done talking and posted what i had written so far. in any case could someone help me ? please include all the #includes that i will need.

After much floundering around, I found a solution (at least for what I wanted).

For my OLED, I found a font that includes the ° symbol (look at 176 in font tables that end with TF).
Include enableUTF8Print(); This solved the problem of having to specify screen position for the symbol.
As for 'first page' and 'next page', I don't know what that means, but it works and so I use it.

Code: [Select]

#include <Wire.h>
#include <Adafruit_SSD1306.h>
#include <U8g2lib.h>

int x=40;

U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //OLED constructor

void setup() {
u8g2.begin();
u8g2.enableUTF8Print(); // enable UTF8 support for the Arduino print() function
}

void loop() {

// u8g2.setFont(u8g2_font_helvB24_tf);
u8g2.setFont(u8g2_font_logisoso58_tf);
u8g2.setFontDirection(0);
u8g2.firstPage();
do {
u8g2.setCursor(0, 65);
u8g2.print(x);
u8g2.print("°C"); // windows keyboard type alt+0176 to get ° symbol
} while ( u8g2.nextPage() );
delay(1000);
}