Using LCD1602 or LCD2004 with ESP32

Поделиться
HTML-код
  • Опубликовано: 31 июл 2024
  • Quickly learn how to use LCD1602-I2C or LCD2004-I2C with ESP32. Learn about 5V and pins of ESP32 and display text on display.
    If you have not used ESP32, you MUST watch this video • How to use ESP32 WiFi ... before you start with using ESP32 with DC motor
    The best thank you for me is to not to skip ads and Subscribe 🔔 to my channel, like 👍 the video It is greatly appreciated. 🔔 😊.
    I will reply to all Subscriber's 🔔 questions. So make sure to Subscribe and enable the bell 🔔.😊 .
    ** DC Voltmeters shown used ***
    AliExpress: s.click.aliexpress.com/e/_ApuvNA
    ** Purchase this 3S 40A BMS from Affiliated Stores **
    From Amazon USA: amzn.to/3kXI6x8
    Amazon Canada: amzn.to/2O9Kchj
    Amazon Europe (all countries): amzn.to/3c6h16K
    Banggood: www.banggood.com/custlink/DGv...
    AliExpress: s.click.aliexpress.com/e/_A7foIs
    Jump to different section of video by clicking on the time:
    00:00 Start
    00:40 ESP32 and LCD explained
    05:10 Wiring and Pins explained
    06:57 Code explained
    12:11 Demonstration
    Get the code for this video: robojax.com/L/?id=261
    ***** Purchase ESP32 from:***
    Amazon Canada: amzn.to/2ZKX8fJ
    Amazon USA: amzn.to/3aQ13OU
    Any European Amazon: amzn.to/37IsIPK
    ******Purchase this LCD1602 I2C from:*****
    eBay: ebay.us/66zQYE
    Amazon USA: amzn.to/3rBaFTw
    Amazon Europe (all countries): amzn.to/38ryLsk
    Amazon Canada: amzn.to/2N3B8tM
    Banggood: www.banggood.com/custlink/GKD...
    AliExpress: s.click.aliexpress.com/e/_A2wvbK
    AliExpress 10pcs: s.click.aliexpress.com/e/_AqB4NK
    Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
    Tutorial by Ahmad Shamshiri form Canada
    ****************************
    Arduino Step by Step Course (over 100 lectures) Starts here • Lesson 00 What is Ardu...
    Learn Arduino in 30 Minutes (video): robojax.com/L/?id=135
    ****************************
    If you found this tutorial helpful, please support me so I can continue creating contents like this. Here is PayPal link paypal.me/robojaxTV
    Follow me on Facebook robojaxTV
    Follow me on Twitter: / robojaxtv
    Follow me on Instagram: / robojax
    Tutorial by Robojax.com
    Get other projects code and learn Arduino
    robojax.com/learn/arduino
    #robojax #robojaxESP32 #robojaxLCD
  • НаукаНаука

Комментарии • 97

  • @lobbers66
    @lobbers66 4 года назад +2

    Thanks for this video. Solved my problem and learnt a lot. Your format is the best, lots of close ups and explanation. Thanks again.

    • @robojax
      @robojax  4 года назад

      You are welcome. I am glad it helped.

  • @kerimcelenka
    @kerimcelenka Год назад

    Thank you! It's very helpful!!!

  • @johnbastin722
    @johnbastin722 Год назад +2

    One of the best explanations of the 1602/esp32 I have seen. Well done 👍

    • @robojax
      @robojax  Год назад +1

      Wow, thanks!

    • @johnbastin722
      @johnbastin722 Год назад

      You mentioned the voltage in, I’d not using the usb connector. I have seen no one use this.

  • @muhammadadnanahmed8324
    @muhammadadnanahmed8324 Год назад

    Really it is best explanation of this video.

  • @mick_hyde
    @mick_hyde 4 года назад +1

    Very clear explanation, thanks.

    • @robojax
      @robojax  4 года назад

      You are welcome.

  • @phoenixset6401
    @phoenixset6401 4 года назад

    I just cant imagine better explaination than this, quick, clear and you are ready to go with LCDs right after this video, no more needs.
    Thank you.

    • @robojax
      @robojax  4 года назад

      Thank you for not skipping the ads and keep watching it. This will help me a lot.

    • @mafketeltje1988
      @mafketeltje1988 3 года назад

      this is "Monkey style" honestly, it works until you need to think yourself about how to innitialize, count etc. But you're right, just getting something on the screen (which most want) is this perfect...

  • @Microsoft-programmiererDe
    @Microsoft-programmiererDe 4 года назад

    thank you, a really great tutorial.

    • @robojax
      @robojax  4 года назад

      You are welcome. Thank you for not skipping the ads and keep watching them. This will help me a lot.

  • @chronobot2001
    @chronobot2001 11 месяцев назад

    Great video.
    It pretty much is just like the Arduino, you just need to know where the SCL and SDA pins are on this board.

  • @manjifera
    @manjifera 3 года назад +3

    Thank you so much for your solution for dim display on esp 3.3v

    • @robojax
      @robojax  3 года назад +1

      you are welcome.

  • @kshitizsharma4581
    @kshitizsharma4581 3 года назад +1

    Thanku sir this video helped me alot

    • @robojax
      @robojax  3 года назад

      Most welcome

  • @INGCANASO
    @INGCANASO Год назад

    ¡Gracias!

    • @robojax
      @robojax  Год назад

      Thank you very much.

  • @TaylenIsInsane
    @TaylenIsInsane 5 месяцев назад

    Thanks for the very helpful video. I have a question, and that is, My ESP32 does not seem to have a 5v pin. I have read some articles that say you can use the VIN pin as a 5V pin, however some comments have some mixed reviews about that, and others say it has worked. Is it safe to do so? I do not want to fry my ESP32 😁

  • @yasin_akar
    @yasin_akar Год назад

    Aleykum selam tesekkür ederim

  • @y32code16
    @y32code16 12 дней назад

    just to clarify, powering a electrical component with 5v will make its logic at 5v. if your lcd is 5v powered and since the esp32 logic is 3.3v that means the sda and scl pins and all gpio pins on the esp32 can only handle 3.3v and CANNOT handle 5v you can degrade your esp32 this way or even fry it or damage it. consider using a logic level shifter (compatible with i2c) with the i2c pins from the lcd to the esp32.

  • @koshan12
    @koshan12 4 года назад

    nice video as always. btw at 1:10 you already have a video for the last one or will you have a video ?

    • @robojax
      @robojax  4 года назад +1

      Thanks. Yes the video for that is coming soon.

  • @cocoon-bike
    @cocoon-bike Год назад

    Hi Robojax, very well explained. Nevertheless I am not yet successful. What I miss (maybe because I am still a beginner at MicroPython), is the reference in the code to the SCL and SDC connections to the ESP32 Pins (21 and 22). Furthermore, the lcd.begin() command is not accepted by the IDE compiler. Any hint?

    • @robojax
      @robojax  Год назад

      I mentioned that you need to install the library.

  • @zeamers3108
    @zeamers3108 4 года назад

    Hi, can you do a countdown timer tutorial on a lcd 16x2 please

    • @robojax
      @robojax  4 года назад

      Hi, In the provided code, we have int count =0; change it to int count =1000; and change the line count++; change it to count--; and it will count down from 1000

  • @MrPaulw517
    @MrPaulw517 2 года назад

    Hi Robojax, I have successfully driven an I2C I Ii I have driven a non I2C 16x2 LCD with an ESP DEV board. However, I have not been successful driving it with a ESP Mini board???? Any suggestions would be appreciated.

    • @robojax
      @robojax  2 года назад

      Hello, this is very simple . I am not sure about board you are trying to use but just find the SDA and SCL pins and it will work.

  • @ezem90
    @ezem90 4 года назад +1

    Hi ! great tutorial, but i have a question...
    If you put Vdd to 5V; the output logic in SCL and SDA pins (0 to 3.3V) will not cause troubles ??
    im asking this because I've seen the PCF8574T datasheet and the minimum HIGH level input voltage is 0.7Vdd (3.5V for Vdd = 5V) .

    • @robojax
      @robojax  4 года назад +1

      the supply voltage and logic voltage are different. so don't worry. the display will work without issue.

    • @citakis1277
      @citakis1277 2 года назад

      @@robojax This information was exactly what I was looking for.

  • @soulstice555
    @soulstice555 2 года назад

    Hi I have a question! When you say if you bring the wire in the breadboard you can connect to up to 128 devices, you mean with one esp32 i can connect many lcd?

    • @robojax
      @robojax  2 года назад

      Hi, Yes exactly you can control that many devices .

  • @qzorn4440
    @qzorn4440 Год назад +1

    hi, my new lcd2004-i2c display project is with a Lilygo ESP32 CAN RS485 Modbus SD-card with limited pins IO_05,12,18,25,32,33,34,35... wish me luck and thank you.

  • @hagory85
    @hagory85 Год назад

    Buenas , en primer lugar excelente trabajo… podrías pasarme el enlace de la librería?

    • @robojax
      @robojax  Год назад

      Hi, the link is in the description well the video.

  • @noedger
    @noedger 8 месяцев назад

    Hi. I know this is old but I need some advice. Got my screen working with your tutorial but adding a rotary encoder button seems to be a problem. As soon as I declare the encoderbutto pins the screen does not work. It only displays all blocks of pixels lit up. Can you assist.

    • @robojax
      @robojax  8 месяцев назад

      Hi, you can learn it from this video ruclips.net/video/6xVLbNlmK-g/видео.html

  • @samanedu
    @samanedu 4 года назад

    Greetings, thanks for the tutorial.
    Is there a way to tell the lcd.init () function that the display is connected to the alternate I2C GPIO 18 and 19? Because I am using a TTGO T-CALL ESP32 SIM800L module and the default I2C port (GPIO 21 and 22) is compromised

    • @robojax
      @robojax  4 года назад

      You are welcome. I have not tried it, but first include "Wire.h" and then inside setup if you use Wire.begin(I2C_SDA, I2C_SCL); Wire.begin(15, 16); it should work.

    • @samanedu
      @samanedu 4 года назад

      @@robojaxThanks for the prompt response.
      I solved it by starting a second I2C bus with the instruction Wire1.begin (18,19) and I edited the LiquidCrystal.cpp library replacing everything (Wire) said by (Wire1). It is an extreme solution but I could not do otherwise.

    • @samanedu
      @samanedu 4 года назад

      I meant LiquidCrystal_I2C.cpp (new version running for ESP32)

    • @robojax
      @robojax  4 года назад +1

      good to know you resolved. 😊

    • @rtufino
      @rtufino 4 года назад +1

      Hi @@samanedu! Can you send to me the link to LiquidCrystal_I2C library? I'm trying with different examples but my circuit doesn't work.

  • @altitude1039
    @altitude1039 2 года назад

    Thanks for sharing!
    Where did you get that little LED voltmeter? I could use a few of those for my projects.

    • @robojax
      @robojax  2 года назад +1

      Hello, sorry for late reply. I just got the links from another video and put them in the description for voltameters.

  • @2020gaurav
    @2020gaurav 3 года назад

    Is it possible to take 5 volt for LCD from external source rather then ESP32 VIN pin ?

    • @robojax
      @robojax  3 года назад

      5v is just voltage , sure possible

  • @ricadostephane9529
    @ricadostephane9529 2 года назад

    thank you Sir for this video. please can i have the circuit diagram for this?

    • @robojax
      @robojax  2 года назад

      I have explained the pins and then mentioned them one by one. you can draw them using Fritzing a free software here fritzing.org/

  • @melissaitzelcruzantonio4269
    @melissaitzelcruzantonio4269 2 года назад

    puedo conectar Vin de mi esp32 al VCC del lcd? no causa problemas? Mi esp32 no tiene 5V, solo tiene 3.3V y Vin

    • @robojax
      @robojax  2 года назад

      La pantalla LCD necesita 5V. no funcionará con 3.3V

  • @kystuart1413
    @kystuart1413 2 года назад

    hi sorry how do you count down from a certain number that u can set?

    • @robojax
      @robojax  2 года назад

      Hi, you can learn it from this counter video ruclips.net/video/5A9jPD5nUCw/видео.html but instead of 0 at start, set your number like 100 and then instead of ++ which increments, use -- to decrements the value.

  • @DirtNerds
    @DirtNerds 4 года назад

    I can never get your videos to load would love to see what you are doing.

    • @robojax
      @robojax  4 года назад

      Sorry. What is the problem?

  • @studiomaquette8146
    @studiomaquette8146 9 месяцев назад

    Hi guys I don't have the libairi by Franck do you have an alternative.Thanks

    • @robojax
      @robojax  9 месяцев назад

      The library is provided. you just download and install it. There is a link under the video or shown in the video.

  • @AndrewMurphy1
    @AndrewMurphy1 2 года назад

    I just purchased the longer esp32 boards and when I connect up the LCD to the required pins the board appears to not get enough power to light the LCD backlight and the red light on the esp32 just keeps flashing.
    Is this a known issue or is there something I'm doing wrong here?
    Thanks

    • @robojax
      @robojax  2 года назад +1

      Hell, I am not sure where you have connected the 5V of LCD, make sure it is connected to 5V and it will work. Use multimeter to measure the voltage.

    • @AndrewMurphy1
      @AndrewMurphy1 2 года назад

      @@robojax Solved it. Changed the ground pin. I was using the ground pin directly next to the 5V originally, switched to the one the opposite side of the board.

  • @dariosouza8956
    @dariosouza8956 3 года назад +1

    Ola meu querido, acompanho seu videos, estou tentando compilar o codigo com LCD 20x4 I2C com esp 32 e da a seguinte mensagem:
    invalid conversion from 'int' to 't_backlighPol' [-fpermissive]
    estou usando a biblioteca:
    #include
    poderia dar uma dica onde esta o erro?

    • @robojax
      @robojax  3 года назад +1

      please use the library I provided. it should work.

  • @MXx222
    @MXx222 3 года назад +1

    Hi, I am receiving this error while uploading code to my esp32. kindly if anyone can guide
    "invalid conversion from 'int' to 't_backlightPol' [-fpermissive]"

    • @robojax
      @robojax  3 года назад

      Hi, you must have changed the code, try the provided code. once it worked, then customize it.

  • @florent9555
    @florent9555 4 года назад

    Does the SDA and SCL have to be connected with G21 and G22? Could I use G25 and G26 instead?

    • @robojax
      @robojax  4 года назад

      you haven't watch the video fully. please watch it. I can't watch it to answer your question.

    • @florent9555
      @florent9555 4 года назад

      @@robojax I have watched the video. You do not explain if it is possible to use other pins than G21 and G22. Or what impact it has when choosing different pins.
      Edit: randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/
      The ESP takes quite some space if you only use one normal breadboard. Without using 2 Breadboards you have to rely on just on side of the esp thats why I asked you this question but it is answered now

    • @robojax
      @robojax  4 года назад

      I am glad you found the the answer. good luck.

  • @LumingMotion
    @LumingMotion 3 года назад

    Is it possible to use micropython instead of liquidcrystal? And if it is, could you possibly do a video on it?

    • @robojax
      @robojax  3 года назад

      The library sends specific command to display. If you can re arrange it for other purposes, you can do . Modify the library.

    • @LumingMotion
      @LumingMotion 3 года назад

      @@robojax Thanks for the tip!

  • @AngelPufahl
    @AngelPufahl Год назад

    invalid conversion from 'int' to 't_backlightPol' [-fpermissive] im having this problem

    • @robojax
      @robojax  Год назад

      You must be doing something wrong or have not installed library or modified the code.

  • @RTOHIO
    @RTOHIO 3 года назад

    When I tried compiling this sketch it gave me an "Exit status 1 'LiquidCrystal_I2C' does not name a type. Same message I got when I tried t compile another sketch that was written and proven right in front of me. Do you know why I get this message? I would be very happy if you could help me. Likewise if one of your subscribers knows and could answer my post. Really like your approach and video style.

    • @robojax
      @robojax  3 года назад

      Hi, you are getting the error because you are skipping the video and not watching it fully. It has been explained it. Just watch skipping, and follow the instruction. it will be resolved. I have also updated the page with more details to help you better.

    • @RTOHIO
      @RTOHIO 3 года назад

      I have solved this problem. Please tell me the source of your LiquidCrystal_I2C.h so I can obtain a copy to compare it with the library that would not work for me. This community of ARDUINO/esP32 sharing knowledge is wonderful. Thanks for all the time you put into making these videos.

    • @robojax
      @robojax  3 года назад

      I have included all resources and related video and contents in in the same page. Please visit the page where the code is provided. you will see anything that is related to this including the LCd library. I do this for all my videos.

  • @J-s0n
    @J-s0n 4 года назад +1

    Where is the library for the lcd?

    • @robojax
      @robojax  4 года назад

      when video starts it says "You can get the code for this video by clicking on the link under the video in the description which will take you to robojax.com slash learn slash arduino". Perhaps you escaped the video.

    • @j.n.5523
      @j.n.5523 4 года назад +1

      @@robojax I think, it is unclear that the "ESP32 Github repository" is the library link.

    • @rtufino
      @rtufino 4 года назад +1

      @@j.n.5523 @Robojax In your links doesn't show the link to library

  • @nagarava
    @nagarava 4 года назад

    I want projects on esp8266-01

    • @robojax
      @robojax  4 года назад +1

      It is coming in the next few days. Subscribe so you know.

  • @kiran12n
    @kiran12n 4 года назад

    Compressed 3072 bytes to 128...
    Writing at 0x00008000... (100 %)
    Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 501.6 kbit/s)...
    Hash of data verified.
    Leaving...
    Hard resetting via RTS pin...
    It says Done Uploading.
    I have made all the connections as described in the Video but in RG1602A it's not displaying.
    Please help me

    • @robojax
      @robojax  4 года назад

      what is this? Error? it should have been clarified. what is RG1602A? is it something different? LCD1602 is how I know it. Please upload this I2C canner robojax.com/learn/arduino/?vid=robojax-I2C-scanner into the ESP32 and if your wiring is good, you should see the I2C address.

    • @AnarchyCookie
      @AnarchyCookie 4 года назад +1

      You might have the same problem as I had. There is different libraries for the LiquidCrystal_I2C. I used a lot of different ones and it would not show any text. The library that worked for me is this one here: github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library
      The difference is that in this library the bits get moved 4 places to the left. Try it and see if this works for you.

  • @dijuathomas5955
    @dijuathomas5955 4 года назад

    LiquidCrystal_I2C liberary link

    • @robojax
      @robojax  4 года назад

      It you watch the video, in the first 30 seconds it will tell you where the code is or see this instruction snipboard.io/EG4O2l.jpg

  • @mgabiel
    @mgabiel 2 года назад

    no funciona

    • @robojax
      @robojax  2 года назад

      Please watch this first ruclips.net/video/--Fj8QDlGuQ/видео.html and then this video ruclips.net/video/q9YC_GVHy5A/видео.html