Raspberry Pi LESSON 25: Using an LCD1602 LCD Display with I2C

Sdílet
Vložit
  • čas přidán 23. 07. 2024
  • Announcing the Most Awesome Raspberry Pi Lessons of All Times! This time we RUMBLE!
    In this class series, we will be using the most excellent Sunfounder Ultimate Raspberry Pi kit, available here: (Affiliate Link)
    amzn.to/3tSk9Mo
    or for our UK friends, amzn.to/3I5d401
    In this lesson I will show how to use I2C to connect an LCD Display to the Raspberry Pi. I will show how to enable and configure I2C on the Raspberry Pi, and then how to connect up the LCD1602 LCD to the Raspberry PI. I show how to install the LCD1602 Library, and then how to write text to the LCD.
    If you want to grab those cool little straight jumper wires I am using to keep my breadboard builds neat and clean you can snag a box of them here:
    amzn.to/36NyfHq
    If you guys are interested in the oscilloscope I am using, you can pick one up here (affiliate link):
    amzn.to/3v13Mhl
    You guys get your hardware ordered so you can follow along at home!
    You will also need a Raspberry Pi. I suggest the Raspberry Pi 4. If you do not already have one, this is the most suitable gear I could find:
    amzn.to/3pBMfKm
    The Raspberry Pi's are sort of pricy right now, so you can look on ebay or elsewhere to see if there are any deals. You will need a SD card. If you do not already have one, this is a good one:
    amzn.to/3KcXTn2
    I like using a wireless keyboard and mouse to have fewer wires. You can certainly use your USB keyboard and mouse, but if you want a nice wireless one, this one works on the pi. We demonstrate this by using a button switch to control a LED.
    amzn.to/36Rv9Sk
    You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
    / paulmcwhorter
    #TUTORIAL
    #DHT-11
    #RASPBERRYPI
  • Věda a technologie

Komentáře • 45

  • @tntragan
    @tntragan Před rokem +3

    Love seeing the fisherman. I love to fish myself and really like seeing those boats.

    • @paulmcwhorter
      @paulmcwhorter  Před rokem +3

      And yet I have lived on the river for two years and never caught a fish. I have the gear, but not the expertise. The river is teaming with tilapia and Nile Pearch.

  • @leeg.1402
    @leeg.1402 Před rokem +2

    I’m probably like many others who do the lesson after the premier when I can concentrate on what’s being said. Trying to do the lesson and keep up with the chat during the premier showing is too distracting for this old guys brain. Anyway, it was a great lesson and I’m anxious to get at it. Thanks for all your efforts Paul.

  • @wilsonlittle4833
    @wilsonlittle4833 Před rokem +2

    Another great lesson! Thank You.

  • @larryplatzek9017
    @larryplatzek9017 Před rokem +3

    Another Great LESSON as USUAL! Thank YOU PAUL!

  • @scottwait3585
    @scottwait3585 Před rokem +2

    Really cool. Thanks Paul

  • @charlotteswift
    @charlotteswift Před rokem +1

    I've played around slightly with the LCD1602 display but (as i mentioned in the chat) I couldn't remember doing all this. It's good that you went through all the steps with us but all I did was to enable i2c and SPI using raspi-config and everything worked fine. This tutorial has actually made me want to dust off my Pi 1 to see what I can do with it. And I did save the LCD1602.py library.

  • @decheek476
    @decheek476 Před 5 měsíci +1

    WORKED FOR ME

  • @arbab8114
    @arbab8114 Před rokem +1

    Hello Paul.
    Been loving this series this far. Can you please make some videos on how to find a supervisor for masters program.

  • @billlatuszek2774
    @billlatuszek2774 Před rokem +1

    Thank You !

  • @grandadmark7023
    @grandadmark7023 Před 7 měsíci

    Haven’t seen it mentioned, but you have two lessons both are numbered 25. Caused me some confusion…anyhow, thank you for all your hard work making these lessons, they are excellent.

  • @nishantaggarwal4001
    @nishantaggarwal4001 Před měsícem

    Please make a video of how to interface the 16X2 LCD in 4-bit and 8-bit mode with the Rasberry Pi without using I2C protocol.

  • @rienwijnsma3410
    @rienwijnsma3410 Před rokem

    Very interesting. I have been looking at other videos on youtube about running this display from a PI and they all skip the bit about installing the display. and jump right into the coding.

  • @keyboardlearning7552
    @keyboardlearning7552 Před rokem +2

    I did it!
    My video is at :
    czcams.com/video/0pc5QMr0O8w/video.html
    This is the video of my homework to Lesson 25 : Using the LCD1602 Display, DHT11 Temperature and Humidity Module, Transistor driven sounder, and a Pushbutton, make a Temperature Alarm, which is controlled by pressing a button, and turning a pre-set potentiometer.
    I also had a couple of Learning points!
    When I designed the layout of the breadboard, I made sure that I wasn’t going to use any of the pins (with special purposes, e.g. I2C nor SPI, etc.), but I didn’t realise that only the GPIO12, GPIO13, GPIO18 and GPIO19 pins supported PWM. Once that was solved, everything worked correctly.
    Secondly, I have a personal preference for using the Pushbutton to enable ‘Setting Mode’, rather than toggling between modes. For example, you can’t leave mine with the alarm disabled, and walk away, expecting an alarm which will never happen.

  • @HungNguyen-gl2xt
    @HungNguyen-gl2xt Před 8 měsíci

    Hello Paul, I have a concern about the signal of SDA and SCL port of LCD1602 that will it return the signal back to SDA and SCL port with 5V signal. SDA and SCL ports are supposed to handle only 3,3V so may it make the damage in raspberry Pi if we connect LCD1602 and raspberry Pi directly ?

  • @Bennie486
    @Bennie486 Před rokem

    Very good training material. Well done and Thank you!
    Out of curiosity, what needs to be changed in the Library file to use more than one LCD?
    Also, if I am planning to use a 20x4 LCD, what do I need to be change inside the library file?

    • @keithlohmeyer
      @keithlohmeyer Před rokem

      I think you can run multiple LCDs but the displays have to have different i2c addresses. Just initialize them with different names (lcd1, lcd2). The RPLCD library supports the 2004 displays. Can't link here but Google brings it up. It is a pip install and the docs are good.

    • @Bennie486
      @Bennie486 Před rokem

      @@keithlohmeyer thank you so much, I did exactly that and it worked. I'll search for the 20x4 info.

  • @mradulbhardwaj3147
    @mradulbhardwaj3147 Před rokem +1

    Where can I find these libraries & theri reference ??

  • @jeancharlesaubinaud8849
    @jeancharlesaubinaud8849 Před 2 měsíci

    hello i try to see your video but my visual studio code tell me in the module LCD1602.py No module named 'machine' WHY ?

  • @siphesihlefisokuhle9765

    My LCD only displays the first 8-Bits, the last 8-bits don't display anything at all, what could be the problem?

  • @peterkarlsson7801
    @peterkarlsson7801 Před rokem

    I had to adjust the contrast of the LCD display, by turning the small pot on the backside, to be able to see the text.

  • @leflopshow
    @leflopshow Před rokem

    Just a quick question, how can I let text scroll from right to left / left to right?

    • @stoopid-studios
      @stoopid-studios Před 11 měsíci

      import LCD1602
      import time
      LCD1602.init(0x27,1)
      x=0
      try:
      while True:
      if x

  • @FarhanYAlyas
    @FarhanYAlyas Před rokem

    Hello professor, Do you teach any Cybersecurity field?

  • @lensman192
    @lensman192 Před rokem

    I am not getting my display to clear every time that I interrupt the program. The "LCD Good to Go" does come up every time, but the display only sometimes clears. I am using a Raspberry Pi 3b+ and have changed the time.sleep(time) to different values. I even added another tiime.sleep(time) and LCD1602.clear() pair of lines and it still doesn't clear every time. Anybody else got that same issue or have it figured out?

    • @neilausten9404
      @neilausten9404 Před rokem

      I'm on RPi 3b, same problem except mine won't clear at all. Worked OK on my RPi4

    • @grandadmark7023
      @grandadmark7023 Před 7 měsíci

      I’m using a Pi4 and it didn’t work when time delay was 0.2…changed delay to 0.1 works every time.

  • @Bob-zg2zf
    @Bob-zg2zf Před rokem +2

    Your channel "Successful Homesteading" seems really valuable these days, as the earth seems crazy nowadays, when it comes to climate change, resulting in floods, earthquakes, etc, killing thousands of innocent people. I wish most people could do homesteading and be safe.

  • @aman-sood
    @aman-sood Před rokem +1

    Homework completed - czcams.com/video/xJgykDcC9Y8/video.html

  • @jasontito7644
    @jasontito7644 Před rokem

    maybe we can make more complicated projects one day? thanx

  • @mamadoubapassioninformatique

    Sorry, I missed the lesson.

  • @davidschnider1297
    @davidschnider1297 Před rokem

    Hello Paul and Class... 1st I enjoy seeing and learning about the fishing activities outside your home ...
    Yes, the same thing happened to me -> "blank screen" on initial use .. LOL .. all good..
    Now for the homework... success - after quite a bit of head-scratching .. all good.. here is a link to my solution ....czcams.com/video/ZuNCLB7IRKU/video.html

  • @legendarystudios8421
    @legendarystudios8421 Před rokem

    first

  • @hammadahmed3409
    @hammadahmed3409 Před 10 měsíci

    Homework czcams.com/video/ymS6p_5tvDk/video.html