Run ESP_UniClock on the NixieIN12v2 clock
Adds CLOCK_90 and the nixie595.ino driver: two 74HC595s on hardware SPI (GPIO13/14, latch GPIO15), multiplexed from an IRAM-only timer1 ISR. Neon dots on P1; P2 is the decimal-point line on this board. Also: - NeoPixel on any ESP8266 pin via bit-bang (GPIO12), and take the pin back after SPI.begin() claimed it as MISO - ArduinoOTA (USE_ARDUINO_OTA), with an OTA upload env in platformio.ini - DST: EU end date (last Sunday of October) instead of the first Sunday of November, and recompute the time from the rules when DST is toggled instead of shifting it by 1 h - forward declarations so PlatformIO's .ino conversion compiles - FIRMWARE_SERVER can be overridden; empty for CLOCK_90 Verified on the clock: tubes, order, dots, LEDs, LDR, NTP time with DST. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b347f1c63f
commit
0d3e878051
7 files changed
+304
-34
No files matched your search
@@ -52,6 +52,7 @@
|
||||
ZM1500_ESP32 (CURRENTLY ACTIVE, CLOCK_72 below) -> ZM1500.ino
|
||||
WORDCLOCK -> wordclock.ino (+ font5x7.h for its scrolling/overlay font)
|
||||
DUMMY -> dummy.ino (sensor-only "clock", no physical display)
|
||||
NIXIE595_MULTIPLEX (CLOCK_90) -> nixie595.ino
|
||||
*/
|
||||
|
||||
//#define CLOCK_1 //8266, UNFI PCB clock, 4x IN-16 tubes
|
||||
@@ -110,11 +111,43 @@
|
||||
//#define CLOCK_57A //V2-WROOM ESP32, UNFI 2xHV5222 6xZ57xM clock /flat panel
|
||||
//#define CLOCK_70 //1 tube esp8266 Nixie Clock by UNFI
|
||||
//#define CLOCK_71 //2x VQC10 clock by UNFI
|
||||
#define CLOCK_72 //ESP32, UNFI board, ZM1500
|
||||
//#define CLOCK_72 //ESP32, UNFI board, ZM1500
|
||||
//#define CLOCK_80 //word clock, english version
|
||||
//#define CLOCK_81 //word clock, german version
|
||||
//#define CLOCK_82 //word clock, hungarian version
|
||||
//#define CLOCK_99 //Dummy clock, sensor box with MQTT connector
|
||||
#define CLOCK_90 //8266, RetroModding NixieIN12v2 HV2.0 (5 V): 4x IN-12, 2x IN-3, 2x 74HC595 multiplex
|
||||
|
||||
#ifdef CLOCK_90 //8266, RetroModding NixieIN12v2 HV2.0 (5 V): 4x IN-12, 2x IN-3, 2x 74HC595 multiplex
|
||||
// Pins and shift-register bit map confirmed from the stock firmware SV1.3
|
||||
// (docs/stock-firmware-pins.md in the nixie-clock repo).
|
||||
#define DEBUG
|
||||
#define FW "fw90" //firmware name
|
||||
#define MAXBRIGHTNESS 100
|
||||
#define NIXIE595_MULTIPLEX
|
||||
#define PIN_LATCH 15 //74HC595 storage clock. DATA = GPIO13 (HSPI MOSI), CLOCK = GPIO14 (HSPI SCK)
|
||||
#define SPI_FREQ 4000000 //stock uses 25 MHz; 16 bits per slot need far less
|
||||
byte anodeBits[] = {14, 13, 12, 11}; //595 word bit of each tube's anode: position 0 = rightmost (A4) ... 3 = leftmost (A1)
|
||||
#define NEON_BITS (1 << 10) //IN-3 dots on P1. P2 (bit 15) drives the IN-12B decimal points on this board (JP2 closed)
|
||||
#define NEON_POS 1 //the dots are lit in this tube's multiplex slot, as on stock
|
||||
#define USE_NEOPIXEL
|
||||
#define NEOPIXEL_PIN 12 //bit-banged, GRB 800 kHz
|
||||
byte tubePixels[] = {0, 0, 1, 1, 2, 2, 3, 3}; //8 WS2812, two per tube (strip order not verified yet)
|
||||
#define USE_RTC //DS3231 on I2C, detected at startup (address 0x68); the stock firmware never used it
|
||||
#define PIN_SDA 4
|
||||
#define PIN_SCL 5
|
||||
#define LIGHT_SENSOR_PIN A0 //LDR to Vcc, 10k to GND (REF_RESISTANCE default)
|
||||
#define MAXIMUM_LUX 100 //Lux level for maximum tube brightness
|
||||
#define AP_NAME "UNICLOCK"
|
||||
#define AP_PASSWORD ""
|
||||
#define WEBNAME "IN-12 Nixie Clock"
|
||||
#define FIRMWARE_SERVER "" //no web-triggered HTTP update; use ArduinoOTA
|
||||
#define USE_ARDUINO_OTA
|
||||
#define OTA_HOSTNAME "nixie-in12"
|
||||
#if __has_include("secrets.h")
|
||||
#include "secrets.h" //optional, gitignored: DEFAULT_SSID, DEFAULT_PSW, OTA_PASSWORD (see secrets.h.example)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
//______________________ESP8266 CLOCKS by UNFI and GP ______________________________________________________
|
||||
#ifdef CLOCK_1 //8266, UNFI PCB clock, 4x IN-16 tubes
|
||||
|
||||
Reference in new issue
Block a user