1095Re: [smartsockets] RE: RSS reader thread...
- Oct 3, 2013I WANT!...GIMME...kpcIn a message dated 10/3/2013 3:15:32 P.M. Pacific Daylight Time, fixitsan@... writes:
After a bit of playing, I present the Raspberry Pi/Smartsocket RSS reader
Making this has highlighted a few problems with the existing Smartsocket code. First, there are no lower case characters so I have to convert nice mixed case messages into all uppercase.
Another problem is that when there a bit punctuation comes along and you're trying to scroll it, there is a clash between the code trying to ignore the invalid punctuation and trying to display the last character. That is why in the video there are occasional double characters at the end of some words.
The Raspberry Pi TX pin connects via a 220Ohm resistor to the Smartsocket, as a precaution towards problems caused by the difference in system voltages , Raspberry Pi at 3.3V and PIC/Smartsocket at 5V.
I'm happy to have got this far and really pleased with Python as a language. So far this is just a proof of concept. Now the real work begins because somehow users need to interact with the unit. For example, if you see a feed scrolling past which you've read already, or which isn't of interest, then you ought to be able to perhaps press a button on a remote control to allow you to jump to the next message. Or maybe yoiu want to see the time ?
The method of operation is roughly as follows..
- Read the whole RSS page in XML format into one long string (Python seems to be able to cope with massive string lengths)
- Step through the string till the <item> tag is found , and then capture the date, time, Title and description...and then write that group of data as a single line in a text file (rssout.txt)
- Once the file is written, the lines are stepped through, one at a time. Each line is read 6-characters at a time and that 6 character wide window is scrolled along, step by step, and appended to a Smartsocket $B7M header.
Anyway, getting this far proves the hardware side of things, as well as proving that Python, Raspberry Pi, Raspbian OS and a wifi dongle all work well together. I haven't had a single website connection failure or a single wifi problem, so I'm really pleased with the reliability and robustness of this system.
- << Previous post in topic Next post in topic >>