iot, coding, raspberry pi, python, javascript, redis,

Synchronised Counting with Redis and a Seven Segment Display

Simon Prickett Simon Prickett 1 min read
Synchronised Counting with Redis and a Seven Segment Display

Counting things seems relatively easy, until it isn’t! In this project, I used Redis to maintain a central count that was displayed on and could be updated from a range of different interfaces. Each interface needed to stay in sync at all times - an update to the count from any interface should update the value of the count shown on that interface and all others at the same time.

For this I used Redis keyspace notifications and built a web interface plus a physical display with a Raspberry Pi, 7 segment display and arcade button. The code was written in a mix of Python and Node.js.

Screenshot from my live stream showing synchronised counting with Redis
Synchronised counting with Redis.

This was the fourth project in my Things on Thursdays IoT live streaming series.

Enjoying this article? Please consider buying me a coffee on Ko-Fi.
Your support helps to fund future projects!

In this two week project I demonstrated how to count things using Redis, then synchronise multiple devices to display the current count. In the first week, I looked at doing this for a web interface with Node.js and Express:

In the second part of this two week project, I implemented an additional counter and display using arcade buttons, a TM1637 7 digit display and a Raspberry Pi 3. I wrote this in Python.

Main photograph - Kraftwerk performing “Numbers” from YouTube.

Simon Prickett
Written by Simon Prickett
Hugely Experienced Developer Relations Leader.