Page 1 of 1

RSS feed on 16x2 i2c LCD

Posted: Tue Oct 20, 2015 11:21 am
by redalbino
Hey guys!
Just recieved my 16x2 LCD that i bought to be able to read RSS feeds sent from my Pi running raspbian.http://www.dx.com/p/i2c-iic-lcd-1602-di ... -pi-374741
I've successfully plugged it in and got some basic text on it using this guide http://www.raspberrypi-spy.co.uk/2015/0 ... pberry-pi/

Been searching the internet for a way to display RSS but have not found anything that seems to work with the i2c bus.
Found a couple of guides where they connect more than the 4 pins i have so im guessing i could not use their scripts?
Examplesnippet from the python script this guy is using [url]ttp://www.schnatterente.net/code/raspberrypi/ ... iption.txt[/url]
DISPLAY_RS = 7
DISPLAY_E = 8
DISPLAY_DATA4 = 25
DISPLAY_DATA5 = 24
DISPLAY_DATA6 = 23
DISPLAY_DATA7 = 18

Where as i would have GND, VCC, SDM and SCL to connect.
Hopefully someone here could send me in the right direction :)
Oh and please be gentle, I'm very new to this :lol:

Re: RSS feed on 16x2 i2c LCD

Posted: Tue Oct 20, 2015 4:30 pm
by RST8
I think you're getting a bit confused between the interface and the application. You've got an i2c display, so must use that interface to send text to it, which you have working, which is possibly the hardest part. You don't need all the code that sets up the display for 4 bit mode.

Looking at the two scripts, the parts that actually send the data are both called lcd_string(), the i2c version has an additional row parameter.

What you need to do is pull out the parts from the RSS reader script that collect and format the data and put that into your i2c script. I note the RSS code does a fair amount of munging to clean up various characters, but it ultimately ends up in the do_display_output(row, message) method, which can neatly fits with the lcd_string(message,row) in the i2c script.

Joe