LCD (20x4 made in China)

In this subforum you can show projects you have made, or you are busy with. Please create your own topic.

Moderator: leecollings

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

Post by pepijn »

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

Post by tlpeter »

That looks nice.
rtna
Posts: 17
Joined: Monday 06 April 2015 12:18
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: LCD (20x4 made in China)

Post by rtna »

Can you write a how-to?

Is it this one?

http://nl.aliexpress.com/item/Free-ship ... 17726.html
pepijn
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)

Post by pepijn »

That's the type of display i used. You can find them on EBay for arround 6 euro's
ThinkPad
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)

Post by ThinkPad »

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 :) ?
I am not active on this forum anymore.
D'rMorris
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)

Post by D'rMorris »

Posting the code would be great, with this I'm gonna build my own security system
u01pei

Re: LCD (20x4 made in China)

Post by u01pei »

Sharing the code Would be great!
pepijn
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)

Post by pepijn »

Yes I will share the code, but need to clean it up a bit.
u01pei

Re: LCD (20x4 made in China)

Post by u01pei »

Great! Thanks Pepijn.... Goed bezig!
pepijn
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)

Post by pepijn »

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.
Attachments
lcd.zip
(6.69 KiB) Downloaded 637 times
D'rMorris
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)

Post by D'rMorris »

Thanks Pepijn!

My next project :).
schmm
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)

Post by schmm »

nice work!

I will try this!!
lrybak
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)

Post by lrybak »

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

Post by mariusvanderwerff »

Hi there,

I'm a noob in this, can you tell me how to install the scripts on my Pi?

Regards, Marius
u01pei

Re: LCD (20x4 made in China)

Post by u01pei »

Hello Marius,
Since you're Dutch, as are most of the people here, read this:
http://www.gejanssen.com/howto/i2c_disp ... index.html
mariusvanderwerff
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)

Post by mariusvanderwerff »

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 ?
u01pei

Re: LCD (20x4 made in China)

Post by u01pei »

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

Post by mariusvanderwerff »

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....
u01pei

Re: LCD (20x4 made in China)

Post by u01pei »

Sorry Marius,

I am a noob myself, so I don't have any clue on what you could do next.
lrybak
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)

Post by lrybak »

Marius,
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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest