I've researched a lot but I couldn't find a solution to my problem, which is that after properly following all steps from this Website: http://www.danielealberti.it/2014/02/collegamento-diplay-lcd-ad-arduino-via.html

and after using the Library LIQUIDTWI2:


for I2C connections, the LCD keeps displaying black boxes on the top row.

I'm pretty sure that I have wired (as shown in the tutorial linked above) and programmed everything correctly but I'm still getting the black boxes. Is the problem related with the MCP23017 pin expander or with something else?

I'm using an Arduino UNO

  • Have you wired up the contrast adjustment pot? If contrast is wrong you can see black boxes.
    – Nick Gammon
    Aug 3, 2015 at 20:46
  • No pin 3 is not connected with a POT. I connected pin 3 of the LCD right to the ground and I dont think that it is a problem with the contrast
    – CrazyBacon
    Aug 4, 2015 at 9:08
  • @NickGammon is contrast is set wrong, either no boxes appear (too low), or boxes appear on both the top and the bottom row (too high).
    – Gerben
    Aug 4, 2015 at 9:10
  • CrazyBacon did not say specifically that there were no black boxes on the bottom row.
    – Nick Gammon
    Aug 4, 2015 at 9:13
  • after properly following all steps - photo perhaps?
    – Nick Gammon
    Aug 4, 2015 at 9:14

1 Answer 1


Quite often such situation occurs when the display does not reset properly (the reset from the IDE does not necessarily reset the display!).

So, once the sktech has been uploaded to the board, I would first try to do a reset on the Uno board (using the RESET button). If that doesn't do the trick, I would recommend to make the contrast adjustable (all my LDC displays showed "black boxes in the upper row" on delivery and I had to ajust the contrast).

If that also has not the desired effect, there is no alternative to debugging your code. Without the code itself, we cannot guess what might be wrong.

  • Thanks. For some reason after resetting the Arduino and attaching a POT to the LCD it started working
    – CrazyBacon
    Aug 5, 2015 at 12:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.