Spot Clock displays current spot prices for physical gold (Au) and silver (Ag) markets.
The three buttons provide basic user interaction:
- Display date and time.
- Display daily price delta or connection errors if applicable.
- Adjust display brightness.
The LED indicates basic information:
Red: Wi-Fi / HTTP error.
Green: Wi-Fi connected.
Blue: Daily price delta reached threshold.
The microcontroller is an Arduino Nano and the Wi-Fi module is an ESP8266 connected together via UART. Spot Clock is powered by a UB micro cable plugged into the Arduino Nano.
The direct to board wiring is a bit crude but effective. The Arduino Nano is held into place when the back panel is attached with the USB port protruding through the panel.
The ESP8266 was originally mounted directly the frame with acrylic clips which placed the antenna too close acrylic causing WiFi connection failures. After the ESP8266 was reoriented the connection issue ceased.
Spots prices are obtained via APMEX’s public RESTful API. [No longer applicable as APMEX removed API access] During firmware development the ESP8266 was found unable to handle large JSON objects due to limited RAM. The solution was to host a PHP script that retrieved, parsed, and reduced the source data into a size that the ESP8266 can process.
Source code: https://github.com/reubenstr/SpotClock