{"id":17967686,"url":"https://github.com/simonprickett/redis-counter","last_synced_at":"2026-04-20T10:03:13.522Z","repository":{"id":62796764,"uuid":"562512311","full_name":"simonprickett/redis-counter","owner":"simonprickett","description":"Counting with Redis, a Raspberry Pi with TM1637 8 segment display and a web interface.  Code in Python and Node.js","archived":false,"fork":false,"pushed_at":"2022-12-21T19:23:03.000Z","size":871,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-03T21:33:45.974Z","etag":null,"topics":["nodejs","nosql","python","redis"],"latest_commit_sha":null,"homepage":"https://simonprickett.dev/things-on-thursdays-livestreams/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simonprickett.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-06T15:36:53.000Z","updated_at":"2023-06-02T07:22:10.000Z","dependencies_parsed_at":"2023-01-30T04:30:27.949Z","dependency_job_id":null,"html_url":"https://github.com/simonprickett/redis-counter","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/simonprickett/redis-counter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonprickett%2Fredis-counter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonprickett%2Fredis-counter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonprickett%2Fredis-counter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonprickett%2Fredis-counter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simonprickett","download_url":"https://codeload.github.com/simonprickett/redis-counter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simonprickett%2Fredis-counter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32042293,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nodejs","nosql","python","redis"],"created_at":"2024-10-29T14:09:16.755Z","updated_at":"2026-04-20T10:03:13.505Z","avatar_url":"https://github.com/simonprickett.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Redis Counter Project\n\nCounting with Redis, a Raspberry Pi with TM1637 7 segment display and a web interface.  Code in Python and Node.js.  \n\n![Screenshot of the completed project](redis_counter_pi_project.png)\n\nThe aim of this project is to demonstrate how the current value of the count, stored in Redis, can be displayed and updated simultaneously from multiple displays.  I demonstrate using multiple instances of a web interface, plus the 7 segment display and an arcade button attached to a Raspberry Pi.\n\nThis project was created as part of my [Things on Thursdays](https://simonprickett.dev/things-on-thursdays-livestreams/) IoT livestreaming series for Redis.  Check out the videos for this project below:\n\n* [Quick Preview of the project working](https://www.youtube.com/watch?v=zUvBzoQJiPQ)\n* [Episode 1](https://www.youtube.com/watch?v=NJyR8FKb9aI\u0026t=8s)\n* [Episode 2](https://www.youtube.com/watch?v=Ad7zHs5ViWw\u0026t=22s)\n\n## Shopping List\n\nIf you want to build one of these, you'll need to have/buy the following items (links to specific suppliers, others are available - Google the items to find suppliers in your country to avoid foreign exchange and import costs):\n\n* A [Raspberry Pi](https://www.raspberrypi.com/products/) (Model 3A, 3B or any model 4) - get whichever you have or can find, as there's a shortage right now.  The 3B is a solid all rounder to use on other future projects too.\n* A decent power supply as this will have to power the Pi and the LEDs.  You'll want a [USB C](https://www.raspberrypi.com/products/type-c-power-supply/) one if using a Raspberry Pi 4, or a [micro USB version](https://www.raspberrypi.com/products/micro-usb-power-supply/) for all other Pi models.  Make sure to get one with the right wall plug for your country!\n* A [Micro SD card](https://www.mymemory.co.uk/memory/memory-cards/micro-sd.html) (8gb should do, larger won't hurt).  You may need a micro SD to regular SD card adapter to connect the card to your laptop/desktop machine to write the Pi OS image to it.  Many micro SD cards come with this adapter.\n* Optional: A case for the Raspberry Pi that still lets you access the GPIO ports.  I use this one in smoke grey from Adafruit: ([case for Pi 3](https://www.adafruit.com/product/2256) but there are lots of other options (check out [this one for the Pi 4](https://shop.pimoroni.com/products/pibow-coupe-4?variant=29210100170835) from Pimoroni for example).  You don't strictly need one of these, but it keeps things tidy and helps protect the Pi from accidental damage.\n* A 4 digit TM1637 7 segment display.  There's many variations of these, so take a look at eBay.  Just make sure to get 4 digits, and pick a colour that appeals to you.  You don't need one that can be chained to others, so the ones with one set of connectors are fine.  Find a display with this [eBay search](https://www.ebay.co.uk/sch/i.html?_nkw=tm1637). \n* One [green](https://thepihut.com/products/official-sanwa-arcade-button-long-life?variant=31934166270014) and one [red](https://thepihut.com/products/official-sanwa-arcade-button-long-life?variant=31934166368318) arcade button.  Anything similar to the ones linked will do, get bigger or smaller ones according to your own preference.\n* 8 [female to female jumper wires](https://shop.pimoroni.com/products/jumper-jerky?variant=348491271) (4 to connect the TM1637 and 2 for each of the arcade buttons).  Having a few different colours helps with identifying the wires when connecting things up, but isn't strictly necessary.  The link is for a pack of 40, so you only need to buy the one pack.\n\n## Raspberry Pi / 7 Segment Display / Arcade Buttons Setup\n\n### Raspberry Pi Setup\n\nTODO\n\n### Attaching the TM1637\n\nTODO\n\n### Attaching the Arcade Buttons\n\nTODO\n\n## Redis Setup\n\nThe fastest way to get started is to create yourself [a Redis database in the cloud](https://redis.com/try-free/).  Once you've signed up and created a database, make a note of the host, port, and password... you'll need these later.\n\nUse the free tier, you don't need to add a payment method.\n\n## Optional: RedisInsight\n\nThis is optional, and free, but worth using if you want to see what's happening in your Redis database:\n\n[Download a copy of RedisInsight](https://redis.com/redis-enterprise/redis-insight/) - once you've installed RedisInsight use the host, port and password for your Redis database to connect.\n\n## Software Setup\n\nOnce you have built the hardware and got your Redis host, port and password it's time to setup the software that we'll use to display and update the counter.\n\n### For the Web Interface\n\nFollow the instructions in the [`web/README.md`](web/README.md) file.\n\n### For the Raspberry Pi\n\nFollow the instructions in the [`raspberry-pi/README.md`](raspberry-pi/README.md) file.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonprickett%2Fredis-counter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimonprickett%2Fredis-counter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimonprickett%2Fredis-counter/lists"}