Display does work, but cannot write anything to it.

Hi, I am having a very strange problem that I am sure will have a simple solution, but for the life of me I cannot find it.

I am using a NodeMCU with a Nokia5110 display (84x48px).

I have tested this combination using the Example program that came with the Adafruit_PC8544 library without issue. The only change I made to the Example code, was to allocate the correct pins to my setup (the exact pin assignment can be seen in the code below).

So, to my code…

My goal is to achieve the following (for an aquarium):

NodeMCU runs a webserver that will allow me to

  • switch lights OFF or ON (via a relay which is not part of the code yet - just switching test LEDs currently)
  • show temperature of the water (DS18B20)

I also want the attached Nokia display to show:

  • water temp
  • IP address of webserver

The problem is that when I upload the code below to my NodeMCU, the display sits idle, displaying only the Adafruit logo. No code changes seem to fix this. I know the code is running because the output on the serial monitor shows me everything is working, I can open the web page, interact with the page, turn off/on the LEDs - except the display on the Nokia never shows me what I am trying to tell it to.

Really hoping someone can shed some light on this.

Code attached.

NodeMCU-http.ino (7.86 KB)

Haven't used one of these, but it looks like you're using D0 and D3 for the LCD but also using Serial which I suspect uses the same pins.

The only change I made to the Example code, was to allocate the correct pins to my setup

Why not use the pin assignments that work in the example ?

I was not able to work out which pins to use on the board to fit the example code.

All the projects i could find that helped guide me used similar setup to what I have used.

I am happy to be wrong, and be shown the correct way, but I am too much of a newbie to work this out for myself.