Hi everyone, a month ago I wrote some code in order to test my az-delivery oled display (128x64) and it worked fine.
Today I uploaded the same code again on my Arduino Nano and fond out that it doesn't work anymore (while other i2c devices do).
Then I plugged the oled on my Arduino Uno, which still had the code from a month ago, and it worked again; but, as soon as I uploaded the same code on the Uno, it ceased to work exactly as my Nano.
The file with the code hasn't been modified.
The only difference I can think of is the IDE: in this month I installed it again and updated all the libraries needed for the project.
I thought there might be something wrong with the latest oled libraries, so I tried to downgrade them but it didn't work.
Any idea on what's going on? Thank you!!
(I share below the code I'm trying to run)
#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
Adafruit_SSD1306 oled(-1);
float volatile x = 0;
float volatile y = 0;
void setup() {
oled.begin(SSD1306_SWITCHCAPVCC, 0x3C); //set the i2c address
oled.clearDisplay();
oled.setTextSize(1);
oled.setTextColor(WHITE);
oled.setCursor(x,y);
}
void loop() {
oled.clearDisplay();
x = 5;
y = 30;
oled.setCursor(x,y);
oled.println("test");
oled.display();
delay(100);
}