Problems displaying temp data from MCP9808 on 0.96" OLED with ATtiny85

Hi!
I am working on a project that boils down to being an adjustable thermostat. I have an ATtiny85 to control an 0.96" 128x64 OLED, as well as an MCP9808 temperature sensor, both communicating via I2C to the ATtiny.

I previously got the library Tiny4kOLED to work, and I was able to display the temperature successfully on the display. However, this library is rather limited, and it was designed for 128x32 OLED displays (only every other row is rendered, possibly fixable, however I have not looked into it).

I then found the u8g2 library, which has a subset called u8x8 that is small enough to fit in the ATtiny85’s small pool of memory.

The problem is that I cannot seem to successfully get this library to want to display the output of the temperature sensor. Below is the code that I have come up with…

#include <Arduino.h>
#include <U8x8lib.h>
#include <Adafruit_MCP9808.h>
#include <TinyWireM.h>

#ifdef U8X8_HAVE_HW_SPI
#include <SPI.h>
#endif


// U8x8 Contructor List-- 
// The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8x8setupcpp
// Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected

U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 2, /* data=*/ 0, /* reset=*/ U8X8_PIN_NONE); 	      // Digispark ATTiny85
Adafruit_MCP9808 tempsensor = Adafruit_MCP9808();
float c = 0;
float f = 0;

void setup()
{
  if(!tempsensor.begin(0x18)){
    while(1);
  }
  //u8x8.setI2CAddress(0x3C);
  u8x8.begin();
  u8x8.setPowerSave(0);
  
}

void loop()
{
  c = tempsensor.readTempC();
  f = ((c * (9.0/5.0)) + 32);
  displayRefresh();
  delay(100);
}

void displayRefresh(){
u8x8.setFont(u8x8_font_amstrad_cpc_extended_r);
u8x8.setCursor(0,0);
u8x8.print(c);
}

The problem is that the display constantly displays “80.00” if I am printing Celsius, or “176.00” if I print Fahrenheit. I have a feeling this is an issue with initializing / communicating with the sensor via I2C, but I cannot pinpoint where I have made a mistake.

I am open to switching libraries or attacking this from a completely different angle if that is what would be best for my project.

Any suggestions appreciated,
Thanks in advance.

The Adafruit_MCP9808 library doesn't work with the ATtiny because it doesn't have a Wire library. You have to modify the Adafruit library to make it work with the TinyWireM library that is designed to work with the Tiny.