0

Font selection for degree symbol: 128x64 OLED
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Font selection for degree symbol: 128x64 OLED

by marine_hm on Fri Jan 05, 2018 9:59 pm

I was able to print a degree symbol on my OLED.
Code: Select all | TOGGLE FULL SIZE
  float temp = bmp.readTemperature() * 9.0 / 5.0 + 32.0;//  Convert to F

  display.setFont(&FreeSerif9pt7b);
  Serial.print(F("Temperature = "));
  Serial.print(temp);
  Serial.println(" *F",1);
  display.setCursor(0, 20);
  display.print( F("Temp: "));
  display.setCursor(62, 20);
  display.print(temp,1);
  display.print(F("   F"));
  display.setFont();
  display.setCursor(100, 8);
  display.print((char)247); // degree symbol
I was asked why I had used display.setFont();
My best explanation was "this was the ASCII font set that contains the degree symbol." I tried it many other ways without results.
Can you enlighten me please?

marine_hm
 
Posts: 220
Joined: Wed Dec 23, 2015 12:56 am

Re: Font selection for degree symbol: 128x64 OLED

by marine_hm on Mon Jan 08, 2018 10:21 pm

Anyone? Bueller?

marine_hm
 
Posts: 220
Joined: Wed Dec 23, 2015 12:56 am

Please be positive and constructive with your questions and comments.