@Twisted and I are going to work on a Raspberry Pi project together - specifically we’re looking to use the UnicornHAT to display scrolling text received in the form of @mentions to its Twitter account.
Now, the bit which you might assume is the hard bit - specifically getting messages to scroll across the LEDs - is probably the easy bit thanks to a tutorial on how to do exactly that inside the Raspberry Pi Projects book.
I’m also not all that concerned about getting the messages from Twitter either, as I’m sure there will be a python library which will make that easy.
No, the bit which concerns me is the linking of the two things above - i.e. taking the messages from Twitter and putting them into a buffer, ready to be served up, one after the other, by the LED script. It is this part of the process for which I’m looking for help.
My idea for solving this problem is to use a CSV file as a buffer - every couple of minutes the Twitter script will grab all the new @mentions from Twitter and put them into the bottom of a CSV file. At the same time, the LED script watch this file for changes, and any time it has data in it, it’ll grab (and remove) the top line to process it.
I have no idea if this is a good idea, or if it can be improved in some way, but it’s the best I have, so I’d be welcome to ideas.
(PS, two extensions to this idea, which I’m sure I’ll be looking for help on at some point - the first is to have an animation play on the HAT while it’s idle and waiting for messages - and the second is to build it into an attractive display unit - but first things first)