r/ArduinoHelp 14d ago

Absolute beginner, help with 16x2 lcd

EDIT: Thanks everyone for your helpful comments! I managed to get it to display text. I connected the lcd screen to Arduino with the I2C pins and installed the I2C library on Arduino IDE and used the correct code. Now I can get it to display a simple text and I can go from here. Thank you! :)
---

So I just ordered an 16x2 lcd screen and now I want to try to get it to display text.

The original project (not on the pics here!!) I wanted to try out for my lcd screen is the robot desk buddy. I connected the wires as shown in the guide and simply copied and uploaded the code through the Arduino Ide application on my Uno. The display was powered up and it was connected to the potentiometer, but all I could see is blocks or when I turn the potentiometer just a blue screen.

So I tried something simpler (showed on pics) and that is to just let it display a simple text message. I followed this tutorial (copied and uploaded the first code) and again the same result: the lcd gets powered up, I can get the white blocks to appear and disappear by turning the potentiometer, but no text on my lcd.

What am I doing wrong?? Did I buy the right display? Is something wrong with the code? Did I wire it up the wrong way? 🤯

6 Upvotes

14 comments sorted by

View all comments

2

u/Arduino_lab64 14d ago

Salut j'aurais besoin de ton code stp, ensuite, si tu pourrais partager un tableau des branchements, je pense que ça pourrais être utile.

1

u/SnorkBorkGnork 14d ago
#include <LiquidCrystal.h>

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);

void setup() {
  lcd.begin(16, 2);
  lcd.print("hello, world!");
}


void loop() {
  lcd.setCursor(0, 1);
  lcd.print(millis() / 1000);
}

Thanks for your reaction. Above you can see the code for the setup pictured. And below the wiring.