/EleksTube-IPS-Retro-Nixie-Digits

Example code to display the Retro Nixie digits extracted from the EleksTube IPS Clock firmware

Primary LanguageC++MIT LicenseMIT

Extract retro digits from EleksTube IPS Clock Firmware

The retro nixie digits in the Elekstube IPS clock, can be extracted from the firmware binary of your clock using the instructions below.

They can be displayed on any 1.14" 135x240 IPS LCD display (and probably others that support 16bpp RGB565). The ESP32 arduino code can be compiled for the clock as well as the TTGO T-display module. See the TTGO_T-DISPLAY define in the code.

EleksTube IPS and TTGO T-Display 7th digit displaying extracted Retro Nixie digits

Arduino Library dependencies for retro-digits example code

See https://github.com/SmittyHalibut/EleksTubeHAX#install-libraries for details on the TFT_eSPI library and how to configure the library for the clock.

Extraction instructions

All extraction and conversion steps were done in Linux using the standard tools:

These can be installed on Windows Linux Subsystem aswell

To extract the contents of the retro.h file, follow these steps:

Backup the firmware from your Elekstube IPS Clock

esptool.py --baud 115200 --port [COM port] read_flash 0x0 0x0400000 fw-backup-4M.bin

Extract the binary data containing the retro digits 9-0

dd if=fw-backup-4M.bin of=retro.bin skip=$((0x15d9a8-9*64800)) count=$((270*2400)) iflag=skip_bytes,count_bytes

Create a C Header file from the binary data

xxd -i -a retro.bin >retro.h

Finally, edit the retro.h file created with xxd and replace "unsigned char" with "static const uint8_t". Replace the retro.h file included in this repo with the new file that contains the data.

Bonus digits

There are additional digits you can extract.

Punk digits:

dd if=fw-backup-4M.bin of=punk.bin skip=$((0x15d9a8-20*64800)) count=$((270*2640)) iflag=skip_bytes,count_bytes

Retro unpowered grid:

dd if=fw-backup-4M.bin of=retro-grid.bin skip=$((0x15d9a8-21*64800)) count=$((270*240)) iflag=skip_bytes,count_bytes

Everything I could find in the firmware:

dd if=fw-backup-4M.bin of=all.bin skip=$((0x15d9a8-21*64800)) count=$((270*5280)) iflag=skip_bytes,count_bytes

To create individual retro digit files (for use in WLED):

for i in {0..9}
do
  dd if=fw-backup-4M.bin of=$i.bin skip=$((0x15d9a8-$i*64800)) count=$((270*240)) iflag=skip_bytes,count_bytes
  convert -size 135x240 -depth 16 GRAY:$i.bin $i.png # for reference, not using in elekstube code
done