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

Поділитися
Вставка
  • Опубліковано 7 січ 2025

КОМЕНТАРІ • 50

  • @tntragan
    @tntragan Рік тому +4

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

    • @paulmcwhorter
      @paulmcwhorter  Рік тому +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 2 роки тому +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.

  • @grandadmark7023
    @grandadmark7023 Рік тому +1

    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.

  • @larryplatzek9017
    @larryplatzek9017 2 роки тому +3

    Another Great LESSON as USUAL! Thank YOU PAUL!

  • @wilsonlittle4833
    @wilsonlittle4833 Рік тому +2

    Another great lesson! Thank You.

  • @charlotteswift
    @charlotteswift 2 роки тому +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.

  • @BunnLilah
    @BunnLilah 4 місяці тому

    Very neat! My brightness was already good. The odd thing is I had to set my sleep pretty high at 1 second for it to clear. 0.2 seemed to keep leaving the letters on the screen, 0.5 was a bit better, but 1 second seems to fully clear it every time for mine.

  • @arbab8114
    @arbab8114 2 роки тому +1

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

  • @scottwait3585
    @scottwait3585 2 роки тому +2

    Really cool. Thanks Paul

  • @sirousmohseni4
    @sirousmohseni4 2 місяці тому

    Very useful video.

  • @keyboardlearning7552
    @keyboardlearning7552 2 роки тому +2

    I did it!
    My video is at :
    ua-cam.com/video/0pc5QMr0O8w/v-deo.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.

  • @decheek476
    @decheek476 11 місяців тому +1

    WORKED FOR ME

  • @rienwijnsma3410
    @rienwijnsma3410 2 роки тому

    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.

  • @HungNguyen-gl2xt
    @HungNguyen-gl2xt Рік тому

    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 ?

  • @nishantaggarwal4001
    @nishantaggarwal4001 7 місяців тому

    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.

  • @billlatuszek2774
    @billlatuszek2774 Рік тому +1

    Thank You !

  • @Bob-zg2zf
    @Bob-zg2zf 2 роки тому +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.

  • @jeancharlesaubinaud8849
    @jeancharlesaubinaud8849 8 місяців тому

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

  • @Bennie486
    @Bennie486 2 роки тому

    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 2 роки тому

      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 2 роки тому

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

  • @mradulbhardwaj3147
    @mradulbhardwaj3147 2 роки тому +1

    Where can I find these libraries & theri reference ??

  • @siphesihlefisokuhle9765
    @siphesihlefisokuhle9765 2 роки тому

    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 2 роки тому

    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 2 роки тому

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

    • @stoopid-studios
      @stoopid-studios Рік тому

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

  • @FarhanYAlyas
    @FarhanYAlyas 2 роки тому

    Hello professor, Do you teach any Cybersecurity field?

  • @lensman192
    @lensman192 2 роки тому

    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 2 роки тому

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

    • @grandadmark7023
      @grandadmark7023 Рік тому

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

  • @aman-sood
    @aman-sood Рік тому +1

    Homework completed - ua-cam.com/video/xJgykDcC9Y8/v-deo.html

  • @jasontito7644
    @jasontito7644 2 роки тому

    maybe we can make more complicated projects one day? thanx

  • @ettienemare
    @ettienemare 2 місяці тому

    import RPi.GPIO as GPIO
    from DHT11 import *
    import LCD1602
    import time
    input_pin = 21
    GPIO.setmode(GPIO.BCM)
    GPIO.setup(input_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
    dht11 = DHT11(16)
    LCD1602.init(0x27, 1)
    btn_last_input = -1
    state = -1
    title = ''
    reading = ''
    start_time = time.time() - 3
    try:
    while True:
    btn_input = GPIO.input(input_pin)
    if btn_last_input == -1 or (btn_last_input != btn_input and btn_input == 1):
    state = (state + 1) % 3
    start_time = time.time() - 3
    btn_last_input = btn_input
    if time.time() - start_time > 2:

    title_len = len(title)
    reading_len = len(reading)

    is_valid, humidity, temperature = dht11.read_data()
    if is_valid:
    start_time = time.time()
    if state == 0:
    title = 'Temperature'
    reading = "{0} C".format(temperature)
    elif state == 1:
    title = 'Temperature'
    reading = "{:.1f} F".format((temperature * 9 / 5) + 32)
    else:
    title = 'Humidity'
    reading = "{0} %".format(humidity)

    LCD1602.write(0, 0, title)
    LCD1602.write(1, 1, reading)

    if len(title) < title_len:
    LCD1602.write(len(title), 0, ' '.ljust(title_len - len(title)))

    if len(reading) < reading_len:
    LCD1602.write(len(reading), 1, ' '.ljust(reading_len - len(reading)))
    time.sleep(.1)
    except KeyboardInterrupt:
    GPIO.cleanup()
    LCD1602.clear()
    print("Demo Good To Go")

  • @mamadoubapassioninformatique
    @mamadoubapassioninformatique 2 роки тому

    Sorry, I missed the lesson.

  • @davidschnider1297
    @davidschnider1297 Рік тому

    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 ....ua-cam.com/video/ZuNCLB7IRKU/v-deo.html

  • @legendarystudios8421
    @legendarystudios8421 2 роки тому

    first

  • @TJK-4091
    @TJK-4091 Місяць тому

    @TJK-4091
    Great classes, only wish I had known about them when you were doing them live

  • @hammadahmed3409
    @hammadahmed3409 Рік тому

    Homework ua-cam.com/video/ymS6p_5tvDk/v-deo.html