Arduino firmware for controlling Nixie tube displays using Momento Topics for real-time updates.
This project provides Arduino code to drive Nixie tube displays with real-time data from Momento Topics. The Arduino connects to WiFi, authenticates with an API endpoint to get a token, and then subscribes to a Momento topic to receive updates that are displayed on the Nixie tubes.
- Arduino Uno r4 board with WiFi capability (using WiFiS3 library)
- Nixie tube display modules (EasyNixie)
- OUT_EN: Arduino pin 3 to OUT_EN
- SHCP: Arduino pin 2 to SHCP
- STCP: Arduino pin 6 to STCP
- DSIN: Arduino pin 7 to DSIN
- EasyNixie library
- WiFiS3 library
- ArduinoJson library
Copy the creds.h.template
file to creds.h
and update with your credentials:
#define WIFI_SSID "your-wifi-ssid" #define WIFI_PASS "your-wifi-password" char tokenEndpoint[] = "your-token-endpoint"; char momentoTopicEndpoint[] = "api.cache.cell-us-east-1-1.prod.a.momentohq.com";
Note: The creds.h
file is included in .gitignore
to prevent accidentally committing sensitive information.
The code:
- Connects to WiFi using the provided credentials
- Obtains an authentication token from the specified endpoint
- Subscribes to a Momento topic for real-time updates
- Processes incoming JSON messages and displays the values on Nixie tubes
- Supports color control for RGB Nixie tubes
- Uses non-blocking HTTP client implementation for better responsiveness
The expected JSON message format from the Momento topic:
{ "value": "123456", // The numeric value to display (zero-padded) "color": 1 // Color code for RGB Nixie tubes }
- Install the required libraries in your Arduino IDE
- Configure your credentials in the
creds.h
file - Upload the sketch to your Arduino board
- The Nixie tubes will display numeric values received via the Momento topic
The code includes:
- Non-blocking HTTP client implementation
- JSON parsing for Momento topic messages
- LED status indicator (blinks to show the system is running)
- Error handling for network and API issues