I want to get inputs off a PCF8591 ADC and display them on an OLED display.
I'm using the thingpulse/ESP8266 and ESP32 OLED driver for SSD1306 displays, but only because it was the first one I found that worked.
This is the code that I'm using to read the ADC, it seems to work fine.
Wire.beginTransmission(0x48); // wake up PCF8591
Wire.write(0x04); // control byte - read ADC0 then auto-increment
Wire.endTransmission(); // end tranmission
Wire.requestFrom(PCF8591, 5);
value0 = Wire.read();
value0 = Wire.read();
value1 = Wire.read();
value2 = Wire.read();
value3 = Wire.read();
Except that it stops working if I initialise the display:
SSD1306Wire display(0x3c, 5, 4);
display.init();
After that, all my inputs read 128.
What do I need to do different?