Comments on: How to Setup an LCD on the Raspberry Pi and Program It With Python http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/ Raspberry Pi, Arduino, and DIY Electronics Projects and Tutorials Fri, 20 Apr 2018 22:07:56 +0000 hourly 1 By: abdullah yüksel http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-25337 Sun, 15 Apr 2018 22:26:20 +0000 http://www.circuitbasics.com/?p=839#comment-25337 thank you it is work !!!

]]>
By: abdullah yüksel http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-24754 Fri, 13 Apr 2018 21:02:48 +0000 http://www.circuitbasics.com/?p=839#comment-24754 Traceback (most recent call last):
File “lcd5.py”, line 2, in
lcd = CharLCD(cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23])
TypeError: this constructor takes no arguments

what is the error?

]]>
By: Danilo http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-24365 Thu, 12 Apr 2018 07:13:01 +0000 http://www.circuitbasics.com/?p=839#comment-24365 Can you post the first line of your lcd.py file? How do you import CharLCD?

It should be “from RPLCD.gpio import CharLCD” if you use GPIO (parallel) mode

]]>
By: syahrul http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-24357 Thu, 12 Apr 2018 05:47:09 +0000 http://www.circuitbasics.com/?p=839#comment-24357 i have some error. pleasew help
Traceback (most recent call last):
File “lcd.py”, line 2, in
lcd = CharLCD(cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23])
TypeError: this constructor takes no arguments

]]>
By: northkorea.moonfruit.com http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-23502 Tue, 03 Apr 2018 15:29:35 +0000 http://www.circuitbasics.com/?p=839#comment-23502 Wow! I hadn’t considered all that. Your blog post very is thought-provoking as well as it inspired me
to think in different ways. Great job. Please visit my blog about DPR Korea.

]]>
By: What's Your Story hack http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-23058 Tue, 27 Mar 2018 04:27:00 +0000 http://www.circuitbasics.com/?p=839#comment-23058 I do not even know how I ended up right here, however I assumed this put up was once good.
I do not realize who you’re but certainly you’re
going to a famous blogger if you happen to are not already.
Cheers!

]]>
By: Danilo http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-22838 Fri, 23 Mar 2018 16:01:22 +0000 http://www.circuitbasics.com/?p=839#comment-22838 Hi. In the latest version, the numbering mode must be explicitly specified.

First, use `import RPi.GPIO as GPIO`.

Then either add `numbering_mode=GPIO.BOARD` or `numbering_mode=GPIO.BCM` to the arguments when creating the CharLCD instance. The numbering mode is important, search on Google/DuckDuckGo to learn about the differences between the two numbering modes.

]]>
By: Danilo http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-22837 Fri, 23 Mar 2018 15:57:05 +0000 http://www.circuitbasics.com/?p=839#comment-22837 Hi

Thanks for writing this tutorial!

Last summer I released version 1.0.0 which changed a few APIs. Most notably, the enums like CursorMode or ShiftMode have been removed in favor of string based APIs. The full changelog is here: https://github.com/dbrgn/RPLCD/blob/master/CHANGELOG.md

It would be great if you could either add a note that people should `pip install RPLCD==0.9.0` or if you could update the tutorial 🙂

Thanks,
Danilo

]]>
By: https://businesslistingtips.wordpress.com http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-22681 Wed, 21 Mar 2018 12:38:35 +0000 http://www.circuitbasics.com/?p=839#comment-22681 I have been searching for information on locxal
business lisitng and found this site. Very useful information !

I would like to introduce a website https://businesslistingtips.wordpress.com/ whicdh
also provides tips on local business listing.
I need more suggestion from great people here.
Thanks!

]]>
By: WFOX http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-21065 Mon, 26 Feb 2018 18:31:26 +0000 http://www.circuitbasics.com/?p=839#comment-21065 It works!
import RPLCD as RPLCD
from RPLCD import CharLCD
import RPi.GPIO as GPIO
lcd=CharLCD(cols=16, rows=2, pin_rs=26, pin_e=19, pins_data=[13, 6, 5 ,11], numbering_mode=GPIO.BCM)
lcd.write_string(u’Hello world!’)

]]>
By: Krish http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-20571 Sun, 18 Feb 2018 14:57:46 +0000 http://www.circuitbasics.com/?p=839#comment-20571 It is not working

]]>
By: kRISH http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-20570 Sun, 18 Feb 2018 14:51:44 +0000 http://www.circuitbasics.com/?p=839#comment-20570 It is showing me error number 13:permission denied

]]>
By: kRISH http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-20569 Sun, 18 Feb 2018 14:44:46 +0000 http://www.circuitbasics.com/?p=839#comment-20569 EVEN i AM GETTING THE SAME ERROR

]]>
By: Krish http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-20568 Sun, 18 Feb 2018 14:41:50 +0000 http://www.circuitbasics.com/?p=839#comment-20568 I did everything but it is showing an error about setting the GPIO numbering mode

]]>
By: Briggs Cline http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-18530 Sun, 28 Jan 2018 12:13:25 +0000 http://www.circuitbasics.com/?p=839#comment-18530 I had this problem too, wheere it says lcd = CharLCD(cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23]) add into it
numbering_mode=GPIO.BOARD so then it will look like this lcd = CharLCD(numbering_mode=GPIO.BOARD, cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23])

]]>
By: Perry http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-17099 Fri, 05 Jan 2018 20:14:29 +0000 http://www.circuitbasics.com/?p=839#comment-17099 Have you used lcd’s assembled with trackpads? Do you have a tutorial on how to use these types of lcds with raspberry pi?

Thank you

]]>
By: edgar http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-14804 Sun, 17 Dec 2017 09:27:10 +0000 http://www.circuitbasics.com/?p=839#comment-14804 You can try:

from RPLCD.gpio import CharLCD
from RPi import GPIO
lcd = CharLCD(cols=16, rows=2, pin_rs=15, pin_rw=18, pin_e=16, pins_data=[21, 22, 23, 24], numbering_mode=GPIO.BOARD)

lcd.write_string(‘Hello world’)

]]>
By: Edgar http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-14803 Sun, 17 Dec 2017 09:16:19 +0000 http://www.circuitbasics.com/?p=839#comment-14803 I don’t know if someone suffered deciding using Python3. I did it, the solution is

instead of use:
sudo apt-get install python-pip
sudo pip install RPLCD

try with:
sudo apt-get install python3-pip
sudo pip3 install RPLCD

]]>
By: sid http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-13685 Mon, 04 Dec 2017 14:32:48 +0000 http://www.circuitbasics.com/?p=839#comment-13685 I wrote a program for raspberry Pi 3:

from RPLCD import CharLCD
import time

while True:
lcd = CharLCD(cols=16, rows=2, pin_rs=24, pin_e=26, pins_data=[32, 36, 38, 40])
lcd.write_string(u”Hello World”)
time.sleep(1)
lcd.clear()

I am getting below error with that program and my LCD screen is constantly blank without any text:

Traceback (most recent call last):
File “./IRsensors.py”, line 208, in
lcd = CharLCD(cols=16, rows=2, pin_rs=24, pin_e=26, pins_data=[32, 36, 38, 40])
File “/usr/local/lib/python2.7/dist-packages/RPLCD/__init__.py”, line 14, in __init__
super(CharLCD, self).__init__(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/RPLCD/gpio.py”, line 95, in __init__
‘must be either GPIO.BOARD or GPIO.BCM’ % numbering_mode)
ValueError: Invalid GPIO numbering mode: numbering_mode=None, must be either GPIO.BOARD or GPIO.BCM

Please help me fix it

]]>
By: Ravivarman rajendiran http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-13364 Wed, 29 Nov 2017 07:53:01 +0000 http://www.circuitbasics.com/?p=839#comment-13364 Thank you. it works.

]]>
By: RASPI http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-11292 Fri, 27 Oct 2017 20:49:53 +0000 http://www.circuitbasics.com/?p=839#comment-11292 In /usr/local/lib/python2.7/dist-packages/RPLCD/gpio.py change “numbering_mode” from “none” to “GPIO.BOARD”

]]>
By: BáN HạT HạNh NhâN http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-10991 Tue, 24 Oct 2017 10:11:37 +0000 http://www.circuitbasics.com/?p=839#comment-10991 This article will assist the internet people for building up new web site or even a weblog from start
to end.

]]>
By: Cooizzo http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-9642 Mon, 09 Oct 2017 17:50:11 +0000 http://www.circuitbasics.com/?p=839#comment-9642 any success? i am getting the same error :/

]]>
By: sumit http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-8148 Sat, 16 Sep 2017 08:04:12 +0000 http://www.circuitbasics.com/?p=839#comment-8148 getting error help me

Traceback (most recent call last):
File “DHT_LCD.py”, line 15, in
lcd = CharLCD(cols=16, rows=2, pin_rs=37, pin_e=35, pins_data=[33, 31, 29, 23])
File “/usr/local/lib/python2.7/dist-packages/RPLCD/__init__.py”, line 14, in __init__
super(CharLCD, self).__init__(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/RPLCD/gpio.py”, line 95, in __init__
‘must be either GPIO.BOARD or GPIO.BCM’ % numbering_mode)
ValueError: Invalid GPIO numbering mode: numbering_mode=None, must be either GPIO.BOARD or GPIO.BCM

]]>
By: Co Crocker http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-4378 Mon, 10 Jul 2017 15:26:03 +0000 http://www.circuitbasics.com/?p=839#comment-4378 It worked! Thanks for your help. Two problems:
1. It only works in 8 bit mode and displays “HelloWorld” not “Hello World” ie. although I included a space between the two words it does not display properly.
2. “Hello World” only works once! I have to completely reboot to enable it to run a second time.
Any hints?

]]>
By: jan http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-3361 Wed, 24 May 2017 22:38:26 +0000 http://www.circuitbasics.com/?p=839#comment-3361 Nice, i tried this and now are the pir sensors which i had connected broken…

]]>
By: sumit http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-2639 Fri, 21 Apr 2017 09:05:25 +0000 http://www.circuitbasics.com/?p=839#comment-2639 it is not working for me..i have checked connection twice…

]]>
By: Tim Connor http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-2342 Mon, 27 Mar 2017 01:22:15 +0000 http://www.circuitbasics.com/?p=839#comment-2342 tryng to light up the LCD I get

/usr/local/lib/python2.7/dist-packages/RPLCD/lcd.py:213: RuntimeWarning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.
GPIO.setup(pin, GPIO.OUT) — and the LCD stays dark

Any ideas

]]>
By: Ashu Bhaumik http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-2292 Wed, 15 Mar 2017 07:33:04 +0000 http://www.circuitbasics.com/?p=839#comment-2292 I have done the same setup but my lcd16x2 is displaying black blocks instead of displaying seven segment display..Plz suggest what should I do

]]>
By: Circuit Basics http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-2265 Sat, 11 Mar 2017 04:58:00 +0000 http://www.circuitbasics.com/?p=839#comment-2265 Have you found the I2C address of your LCD? The code or library you’re running will probably have a line where you need to put the address of your LCD. It might look something like this: ADDRESS = 0x27

This tutorial might help:
http://www.circuitbasics.com/raspberry-pi-i2c-lcd-set-up-and-programming/

]]>
By: Circuit Basics http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-2264 Sat, 11 Mar 2017 04:49:37 +0000 http://www.circuitbasics.com/?p=839#comment-2264 Glad you found it helpful! I’ll make it a little more clear that the pin numbers are the physical pin locations, not the BCM or GPIO numbers.

]]>
By: vaibhav http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-2259 Thu, 09 Mar 2017 17:49:35 +0000 http://www.circuitbasics.com/?p=839#comment-2259 how to combine print date&time’s program and data from the sensor’s program.?

]]>
By: Peter http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-2051 Sat, 21 Jan 2017 02:51:07 +0000 http://www.circuitbasics.com/?p=839#comment-2051 Print Date and Time on LCD does not work in Python 2.7. and PIXEL OS.
while True:
lcd.write_string(“Time: %s” %time.strftime(“%H:%M:%S”)) gives an error and no data is displayed on LCD.
Any help would be appreciated.
Peter

]]>
By: fruanc http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-1842 Wed, 02 Nov 2016 20:30:04 +0000 http://www.circuitbasics.com/?p=839#comment-1842 great tutorial and video! I am attempting the same setup with an i2c interface module. The backlight illuminates, however the text does not display. Here are my configurations any suggestions are greatly appreciated.

https://fruanc.wordpress.com/2016/11/02/i2c-interface-module-w-16×2-lcd-connected-to-pi-zero/

]]>
By: Henry http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-1439 Wed, 20 Jul 2016 02:22:20 +0000 http://www.circuitbasics.com/?p=839#comment-1439 Many thanks for an excellent blog on how to set up an LCD display with a raspberry pi. I had tried 3 other “how to”s without success but following your well set out explanation I was able to get my LCD up and running without any hitches, first time!
Thanks a lot

Henry

]]>
By: Jos Wich http://www.circuitbasics.com/raspberry-pi-lcd-set-up-and-programming-in-python/#comment-1250 Tue, 24 May 2016 11:28:36 +0000 http://www.circuitbasics.com/?p=839#comment-1250 thanks for your explanation, it has been a great help to verify my “programming” skills on the Raspberry Pi 2 & 3. Certainly not everybody will start from scratch reading all your contributions (like me).
I stumbled via a well known search engine into this wealth of great information and succesfully hacked my way through it. Perhaps you may want to add a hint that these scripts will only work with Python 2.7 and the pin allocation is neither BCM or GPIO but physical position ? Or did I miss something ?

Thanks again, hoping to find more attractive help from your webpages when I have made my next steps.

Jos

]]>