LCD (20x4 made in China)
Moderator: leecollings
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
LCD (20x4 made in China)
This week i received one of my latest Chinese investments.
A Blue 20x4 LCD display with I2C interface.
Hooked it up to my (test) Raspberry i did not want to blow my production Banana Pro.
Some Pyhon coding, mostly cut and paste.
The result:
https://vimeo.com/127908552
A Blue 20x4 LCD display with I2C interface.
Hooked it up to my (test) Raspberry i did not want to blow my production Banana Pro.
Some Pyhon coding, mostly cut and paste.
The result:
https://vimeo.com/127908552
-
- Posts: 191
- Joined: Wednesday 26 November 2014 18:43
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: LCD (20x4 made in China)
That looks nice.
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: LCD (20x4 made in China)
That's the type of display i used. You can find them on EBay for arround 6 euro's
-
- Posts: 890
- Joined: Tuesday 30 September 2014 8:49
- Target OS: Linux
- Domoticz version: beta
- Location: The Netherlands
- Contact:
Re: LCD (20x4 made in China)
Looking good! That's nice to combine with this housing: https://www.sossolutions.nl/raspberry-p ... dinrail-2b (DIN-rail) so you can fit it into your meter cabinet.
Maybe you can share your code here ?
Maybe you can share your code here ?
I am not active on this forum anymore.
-
- Posts: 138
- Joined: Thursday 01 May 2014 9:01
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands - Sittard
- Contact:
Re: LCD (20x4 made in China)
Posting the code would be great, with this I'm gonna build my own security system
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: LCD (20x4 made in China)
Yes I will share the code, but need to clean it up a bit.
-
- Posts: 251
- Joined: Friday 12 July 2013 13:19
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: The Netherlands
- Contact:
Re: LCD (20x4 made in China)
This is a nice tutorial (in Dutch) on how-to connect the screen.
http://www.gejanssen.com/howto/i2c_disp ... index.html
I also attached my Python scripts.
http://www.gejanssen.com/howto/i2c_disp ... index.html
I also attached my Python scripts.
- Attachments
-
- lcd.zip
- (6.69 KiB) Downloaded 637 times
-
- Posts: 8
- Joined: Monday 29 September 2014 21:28
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Weert (Netherlands)
- Contact:
Re: LCD (20x4 made in China)
nice work!
I will try this!!
I will try this!!
-
- Posts: 40
- Joined: Thursday 18 December 2014 20:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Poland
- Contact:
Re: LCD (20x4 made in China)
Nice work pepijn. Have you tried to operate domoticz switches via ex rotary encoder?
It would be very nice fature to turn on/off switches directly w/o turning computer or smartphone
It would be very nice fature to turn on/off switches directly w/o turning computer or smartphone
HW: HP dc7900 USD running ESXi, RaspberryPi (few of it), AEON S2 USB stick, Fibaro modules (Dimmers, switches), 1-wire (DS18B20, DS2423), DSC Alarm with Envisalink ethernet module, MySensors, RFLink
-
- Posts: 8
- Joined: Friday 03 April 2015 15:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands
- Contact:
Re: LCD (20x4 made in China)
Hi there,
I'm a noob in this, can you tell me how to install the scripts on my Pi?
Regards, Marius
I'm a noob in this, can you tell me how to install the scripts on my Pi?
Regards, Marius
Re: LCD (20x4 made in China)
Hello Marius,
Since you're Dutch, as are most of the people here, read this:
http://www.gejanssen.com/howto/i2c_disp ... index.html
Since you're Dutch, as are most of the people here, read this:
http://www.gejanssen.com/howto/i2c_disp ... index.html
-
- Posts: 8
- Joined: Friday 03 April 2015 15:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands
- Contact:
Re: LCD (20x4 made in China)
Hi u01pei,
thnx for the reply,
did everything but got only a nice blue screen,
from lcd_display import lcd
my_lcd = lcd()
my_lcd.display_string("Hello World", 1)
my_lcd.display_string("YwRobot LCM1602 IIC V1 display", 2)
my_lcd.display_string("aan de Raspberry Pi", 3)
my_lcd.display_string("via gejanssen.com", 4)
This didn't work also.. any idea's ?
thnx for the reply,
did everything but got only a nice blue screen,
from lcd_display import lcd
my_lcd = lcd()
my_lcd.display_string("Hello World", 1)
my_lcd.display_string("YwRobot LCM1602 IIC V1 display", 2)
my_lcd.display_string("aan de Raspberry Pi", 3)
my_lcd.display_string("via gejanssen.com", 4)
This didn't work also.. any idea's ?
Re: LCD (20x4 made in China)
Perhaps your address is wrong? try this:
enter this command on your pi:
i2cdetect -y 1
if it doesn't work, enter:
i2cdetect -y 0
Check the number in the table, this is your address. If there are more devices on your I2c bus, there will be several addresses visible. To be sure, unplug all other devices and the address left will be the LCD (or try them all)
To use the correct address in the python script:
open the script named lcd_display.py
on line five you will see 0x27
change the 27 into whatever you found in the I2c table. (leave the 0x as is).
Good luck
enter this command on your pi:
i2cdetect -y 1
if it doesn't work, enter:
i2cdetect -y 0
Check the number in the table, this is your address. If there are more devices on your I2c bus, there will be several addresses visible. To be sure, unplug all other devices and the address left will be the LCD (or try them all)
To use the correct address in the python script:
open the script named lcd_display.py
on line five you will see 0x27
change the 27 into whatever you found in the I2c table. (leave the 0x as is).
Good luck
-
- Posts: 8
- Joined: Friday 03 April 2015 15:36
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Netherlands
- Contact:
Re: LCD (20x4 made in China)
Hi u01pei,
the address is correct:
pi@raspberrypi ~/domoticz/scripts/lcd $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
import i2c_lib
from time import sleep
# LCD Address
ADDRESS = 0x27
Checked that already....
the address is correct:
pi@raspberrypi ~/domoticz/scripts/lcd $ sudo i2cdetect -y 1
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- 27 -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
import i2c_lib
from time import sleep
# LCD Address
ADDRESS = 0x27
Checked that already....
Re: LCD (20x4 made in China)
Sorry Marius,
I am a noob myself, so I don't have any clue on what you could do next.
I am a noob myself, so I don't have any clue on what you could do next.
-
- Posts: 40
- Joined: Thursday 18 December 2014 20:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Poland
- Contact:
Re: LCD (20x4 made in China)
Marius,
Double check wiring and try another simple "hello world" program to be sure that everything is ok
Double check wiring and try another simple "hello world" program to be sure that everything is ok
HW: HP dc7900 USD running ESXi, RaspberryPi (few of it), AEON S2 USB stick, Fibaro modules (Dimmers, switches), 1-wire (DS18B20, DS2423), DSC Alarm with Envisalink ethernet module, MySensors, RFLink
Who is online
Users browsing this forum: No registered users and 0 guests