r/Arduino Reddit Subscribers Monitor

Contents

Overview

This project was inspired by the recent milestone achieved by the r/Arduino subreddit. On the 27th of July, 2022 the r/Arduino reached 400K subscribers.

The next milestone, 500K subscribers, is approaching fast. This project is being used by the moderators of r/Arduino to track how things are going.

The basic premise of the monitor is to use an Arduino to display up to date metrics including:

  • Current number of subscribers.
  • The number of active users - which is the number of people currently "in" the r/Arduino subreddit.
  • The number of subscribers over the past 1, 7, 30 and 90 days.
  • The next milestone (e.g. 500K users).
  • An estimate of the date that this milestone will be reached.

Some other things that this project illustrates include:

  • Passing data between a PC program and Arduino over the USB.
  • Various Object Oriented techniques. Including a technique that easily enables alternative display hardware to be used.

Architecture

The project consists of several modules. The various components are shown in the diagram below.

Obviously reddit is the authoritative source of the up to date data. A service on this server monitors the relevant metrics and makes them available for you to display on your Arduino.

Why use this server as a proxy for the metrics?

Because this server provides http: protocol access to the data. What this means is that a network attached Arduino can directly retrieve the data without the need for a PC connection.
I will add this "direct connect" option to the code in a future update.

Another reason for using the proxy server is that it accumulates history. This history is used to provide the historical data points required to estimate future milestones.

Subreddit monitor architecture.

Parts list

To complete this tutorial you will need:

  • An Arduino - I have tested it on Uno, but any model should work.
  • A display of some kind.
    • 8 digit - 7 segment LED display SPI connected, or
    • 2 line - 16 character LCD display (4 or 8 bit) bus connected, or
    • Anything else that you have - see the code section for how to modify the code
  • A PC with:
    • Python - I tested v3.9.10 and v3.7.3, but any Python v3 should work
    • Python's pySerial module.
    • A USB connection to connect your Arduino.
    • An internet connection.
  • Breadboard and hookup wire for your display.
In relation to the PC, I used Windows, but the Python script should also work on Mac and Linux.

Please support me if you can

Please help support these projects by: Buy me a coffee - gm310509 Patreon - gm310509