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

Поделиться
HTML-код
  • Опубликовано: 16 дек 2024

Комментарии • 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.

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

    Another great lesson! Thank You.

  • @larryplatzek9017
    @larryplatzek9017 2 года назад +3

    Another Great LESSON as USUAL! Thank YOU PAUL!

  • @BunnLilah
    @BunnLilah 3 месяца назад

    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.

  • @scottwait3585
    @scottwait3585 2 года назад +2

    Really cool. Thanks Paul

  • @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.

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

    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.

  • @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.

  • @keyboardlearning7552
    @keyboardlearning7552 2 года назад +2

    I did it!
    My video is at :
    ruclips.net/video/0pc5QMr0O8w/видео.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.

  • @sirousmohseni4
    @sirousmohseni4 2 месяца назад

    Very useful video.

  • @decheek476
    @decheek476 10 месяцев назад +1

    WORKED FOR ME

  • @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.

  • @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.

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

    Thank You !

  • @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.

  • @nishantaggarwal4001
    @nishantaggarwal4001 6 месяцев назад

    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.

  • @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 ?

  • @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.

  • @jeancharlesaubinaud8849
    @jeancharlesaubinaud8849 7 месяцев назад

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

  • @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?

  • @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.

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

    maybe we can make more complicated projects one day? thanx

  • @ettienemare
    @ettienemare Месяц назад

    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")

  • @aman-sood
    @aman-sood Год назад +1

    Homework completed - ruclips.net/video/xJgykDcC9Y8/видео.html

  • @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 ....ruclips.net/video/ZuNCLB7IRKU/видео.html

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

    Sorry, I missed the lesson.

  • @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 ruclips.net/video/ymS6p_5tvDk/видео.html