Hello!I do have https://www.waveshare.com/0.96inch-OLED-A.htm oled.When I connect it to my arduino (with the test code provided on the link),it works perfectly..But when I try my nodemcu(and also change the pins),it never turns on.By default it works as spi 4 wire and not I2C..Now,I suspect I m making a rookie mistake.But I can't even think what I m doing wrong..Any thoughts would be much much appreciated..
thrylosthyra7: But when I try my nodemcu(and also change the pins),it never turns on.By default it works as spi 4 wire and not I2C.
How have you wired it to the nodemcu and is it using the ESP8266 or ESP32 chip? Assuming the ESP8266 then the SPI pins are...
#define PIN_SPI_SS (15) (D8) #define PIN_SPI_MOSI (13) (D7) #define PIN_SPI_MISO (12) (D6) #define PIN_SPI_SCK (14) (D5)
it uses esp8266 chip..but still no luck..
thrylosthyra7: it uses esp8266 chip..but still no luck..
What if you also connect the reset line and reset the display in setup before initializing it...
#define RST 16 pinMode(RST,OUTPUT); digitalWrite(RST, LOW); // set low to reset OLED delay(50); digitalWrite(RST, HIGH); // while OLED is running, must set high
or use a different library like this that supports ESP and reset.
Thank you so so much!That fixed the problem!The library change did the trick!!Thanks so much,again!!