To put my RaspberryPi (which was only laying around) to good use i decided to do a quick hack. Combined with a small 2.4 inch display, it shows the current status of the button from reddit.
A small python script connects to the reddit websocket server and displays the status of the timer, the number of participants and the current record since the script is running.
To run the script:
- install the websocket-client library
- install Adafruit display library
- enable SPI interface
- connect the display
11 thoughts to “The reddit button”
Will this work with a PiTFT?
I don’t have this display, so i can’t really tell. But i assume it is connected like i connected my display, so it should work as long as the spi bus is not occupied by the kernel.
Hey! I talked to you on reddit earlier (fredrikaugust), about not having the font etc. I fixed that issue, but after that I started using the screen as the main display for the raspberry pi (aka. it is occupied by the kernel). Do you know how to un-do that?
Sorry, i never used a tft module as the main display, so i don’t really know if it could be shared between the kernel and another program. My guess is that you have to deactivate it as your main display. But if i find the time to experiment some more i might find a solution… but that will take a while.
What display are you using?
I think i bought in on ebay. But you can take any display with an ILI9341 driver.
How do i fix the missing font issue?
You can use any ttf-font you like, or you download the one i used, and place it in the same folder.
Hi, I ordered a screen which has arrived today. It looks to be the same as yours however the guide you have linked to has a different screen so I am a bit stuck on this part. Are you able to take a photo or something to show the exact connections you made with this specific screen? Many thanks!
I think i connected the display some how like this.
Nice idea – i want to build a buylist marker this way. Just press one of the wifi buttons in my kitchen boards and my pie is collecting the “signal” and is generating a buylist for next drive to the supermarket.