A custom firmware for the EleksTube IPS Clock

Overview

EleksTubeHAX - An aftermarket custom firmware for the EleksTube IPS clock

Buy your own clock here: EleksTube IPS Clock

Reddit discussion on the hack is here.

Original documentation and software from EleksMaker.

How to build this firmware

Unfortunately, it's not simple plug-and-play. You need to do some things. These instructions assume you already know how to use the Arduino IDE, and just need to know WHAT to do.

Download this code

You're either reading this file after downloading it already, or you're reading it on github. I'll assume you can figure out how to get the code from github and put it somewhere on your local machine. This is your preference.

Configure your WiFi network

In the source code directory (where ever you just installed it), copy wifi_creds-example.h to wifi_creds.h and edit it for your WiFi SSID and Password.

Note that wifi_creds.h is in .gitignore, so you can safely put credentials in that file and still submit pull requests, push code, whatever. git will never store your credentials in a repository.

Setup Arduino IDE

Development was done on Arduino 1.8.13. It might work on earlier or later versions, I don't know.

Windows Only: Install the USB Serial Port Device Driver (??)

I'm not a Windows user, but the EleksTube instructions have you installing a driver to get the serial port to work. So I assume that's necessary. It seemed to work out of the box on my Ubuntu 16.04 machine.

Install ESP32 board support from Espressif

File -> Preferences, add https://dl.espressif.com/dl/package_esp32_index.json to your Board Manager URLs. (Comma separated if there's already something there.)

Tools -> Board -> Board Manager, add the esp32 boards by Espressif Systems. Development was done on v1.0.6.

Tools -> Board -> ESP32 Arduino -> ESP32 Dev Module

The default configs in the Tools menu should be fine. The important ones are:

  • Flash Size: 4MB
  • Partition Scheme: Any that includes at least 1MB for SPIFFS. I use the "Default 4MB: 1.2MB App, 1.5MB SPIFFS" one.
  • Port: Set it to whatever serial port your clock shows up as when plugged in.

Install Libraries

All these libraries are in Library Manager. Several libraries have very similar names, so make sure you select the correct one based on the author. The listed "developed on" versions are just the versions I had installed while developing this code. Newer (or possibly older) versions should be fine too.

Sketch -> Include Library -> Library Manager

  • NTPClient by Fabrice Weinberg (developed on v3.2.0)
  • Adafruit NeoPixel by Adafruit (developed on v1.8.0)
  • DS1307RTC by Michael Margolis (developed on v1.4.1)
  • TFT_eSPI by Bodmer (developed on v2.3.61)
  • Time by Michael Margolis (developed on v1.6.0)

Configure the TFT_eSPI library

IMPORTANT You have to do this after every time you install or update the TFT_eSPI library! IMPORTANT

The full documentation for this is in the TFT_eSPI library, but tl,dr:

  • Edit Arduino/libraries/TFT_eSPI/User_Setup_Select.h
  • Comment out all #include lines. (The only one that comes from install is #include <User_Setup.h>.)
  • Add a #include line pointing to User-Setup.h in this code.
    • eg: #include </home/foo/src/EleksTubeHAX/EleksTubeHAX/User_Setup.h>
    • Obviously, update the path to point to where ever you keep your code. Mac and Windows paths will look very different.

Install SPIFFS uploader

The code is here, and instructions to install it are here.

tl,dr: Download and unzip this file into your Arduino/tools/ directory. There might not be a tools/ subdirectory yet, but if you see Arduino/libraries/ that's the right place.

Restart Arduino

After installing the ESP32 support, all the libraries, and the SPIFFS uploader, restart Arduino to make sure it knows its all there.

Upload New Firmware

Make sure you configured everything:

  • Put your wifi credentials in wifi_creds.h
  • Pointed User_Setup_Select.h in the TFT_eSPI library to our User_Setup.h

Connect the clock to your computer with USB. You'll see a new serial port pop up. Make sure that's the serial port selected in Tools.

Compile and Upload the Code

Compile (Ctrl-R) and Upload (Ctrl-U) the code. At this point, it should upload cleanly and successfully. You'll see the clock boot up and connect to WiFi. But it doesn't have any bitmaps to display on the screen yet.

Upload Bitmaps

The repository comes with a set of BMP files, nixie tubes from the original firmware, in the data/ directory. See below if you want to make your own.

Tools -> ESP32 Sketch Data Upload, will upload the files to the SPIFFS filesystem on the micro. They'll stay there, even if you re-upload the firmware multiple times.

Custom Bitmaps (Optional)

If you want to change these:

  • Create your own BMP files. Resolution must be 135x240 pixels, 24bit RGB.
  • Name them 0.bmp through 9.bmp and put them in the data/ directory.

Then do the "Tools -> ESP32 Sketch Data Upload" dance again.

Development Process:

Original Firmware

Check in original-firmware/ for a direct dump of the firmware as I received my clock, and instructions for how to restore it to the clock. This is useful if you're hacking around and get some non-working code, and just want to restore it to original.

Unpacking BMPs from original firmware

Download and unpack the original software (link above). It contains a directory called IPSimages/ which contains several pre-made SPIFFS images full of the BMPs available in the original software. You can see what they all look like in the gallery/ directory, same numbers.

To unpack one of these SPIFFS images into the original BMPs:

  • Make a destination directory, eg: unpacked/
  • Run: mkspiffs -u unpacked/ [image].bin
    • This assumes you've already installed ESP32 support in Arduino. mkspiffs comes with the ESP32 tools. On my Linux system, it's in ~/.arduino15/packages/esp32/tools/mkspiffs/0.2.3/mkspiffs.
    • If you're on Windows, the IPS software also comes with mkspiffs.exe which I assume works the same way, but I haven't confirmed.

This puts 12 files in unpacked/:

  • 0.bmp through 9.bmp which are 135x240px 24 bit BMPs for the 10 digits
  • month.bmp and date.bmp another couple BMPs, but I'm not sure where they're ever used. We won't need these in our firmware, so they can be deleted.

Documentation

Hardware

Libraries

  • Talking to displays: TFT_eSPI
  • Real Time Clock: DS3231 RTC
  • NeoPixel library for RGB LEDs (link coming)

Hardware

My (SmittyHalibut) notes from reverse engineering the board

Display boards

The card edge connector has 13 connection points on each side, but both sides are tied together, so there are only 13 unique pins.

The socket on the board is oriented so that Pin 1 is on the RIGHT SIDE (look for the little arrow on the top of the socket.) So the documentation below is RIGHT TO LEFT.

  1. WS2812 In
  2. WS2812 Out
  3. TFT pin 5, SDA, ESP32 pin 37, IO23, VSPID
  4. TFT pin 6, SCL, ESP32 pin 30, IO18, VSPICLK
  5. TFT pin 4, RS (Register Select, or DC Data Command), ESP32 pin 10, IO25
  6. TFT pin 3, RESET (active low), ESP32 pin 11, IO26
  7. TFT pin 8, Chip Select, driven by 74HC595
  8. WS2812, GND (Tied to 13)
  9. N/C
  10. TFT pin 1 and 7, Vdd and LEDA (Tied to 12)
  11. TFT pin 2, GND
  • Tied to system ground through a MOSFET, controlled by ESP32 pin 12, IO27, so the displays can be completely turned off.
  • (If I (SmittyHalibut) were doing this, I'd have used a P channel MOSFET and controlled LEDA, which would allow dimming as well as completely shutting it off. Oh well.)
  1. TFT pin 1 and 7, Vdd and LEDA (Tied to 10)
  2. WS2812, GND (Tied to 8)

Chip Select Shift Register

There's a 74HC595 (datasheet) that drives the 6 SPI Chip Select lines on the displays. Chip Select lines are Active Low, so write 1s to the displays you do NOT want to update, a 0 to the display you want to update.

Q0 is the most recent bit written to the shift register, Q7 is the oldest bit written.

Outputs:

  • Q0: Hour Tens
  • Q1: Hour Ones
  • Q2: Minute Tens
  • Q3: Minute Ones
  • Q4: Seconds Tens
  • Q5: Seconds Ones
  • Q6 and Q7: Unused, not connected.

Inputs:

  • Ds (Data In): ESP32 pin 13, IO14, GPIO14
  • /OE (Output Enable): Strapped to Ground, always enabled.
  • STcp (Storage Register Clock Input): ESP32 pin 28, IO17, GPIO17
  • SHcp (Shift Register Clock Input): ESP32 pin 27, IO16, GPIO16

WS2812(?) RGB LEDs

They only require a single GPIO pin to drive all 6 LEDs. They are driven in reverse order, right to left. The first LED is Seconds Ones, the sixth LED is Hours Tens.

  • ESP32 pin 14, IO12

Buttons

All 4 buttons are externally pulled up (an actual 10k resistor!) and shorted to ground by the button.

  • <<<: ESP32 pin 9, IO33
  • MODE: ESP32 pin 8, IO32
  • >>>: ESP pin 7, IO35
  • POWER: ESP pin 6, IO34

RTC DS3231

The DS3231 (datasheet) is an I2C device, and a very common one at that. Lots of good documentation and libraries already.

  • SCL: ESP32 pin 36, IO22
  • SDA: ESP32 pin 33, IO21

Contributers

Mark Smith, aka Smitty @SmittyHalibut on GitHub, Twitter, and YouTube.

Issues
  • NTP sometimes loads a wildly incorrect time

    NTP sometimes loads a wildly incorrect time

    My guess is that we're getting an error packet, or not flushing buffers fully, or something. I'm pretty sure the NTPClient code is pretty trusting in the data it gets from the network and will happily parse something else (eg: an error) as a timestamp and return it.

    Anyway. Detect this sort of failure if possible and retry.

    opened by SmittyHalibut 19
  • Compile error

    Compile error

    I followed the instructions, but I can't compile the project. Can anyone help me? These are some of the errors I get when compiling:

    In file included from C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\Backlights.cpp:1:0: C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\Backlights.h: In constructor 'Backlights::Backlights()': Backlights.h:64:37: error: 'Backlights::config' will be initialized after [-Werror=reorder] StoredConfig::Config::Backlights *config; ^ Backlights.h:60:8: error: 'bool Backlights::pattern_needs_init' [-Werror=reorder] bool pattern_needs_init; ^ Backlights.h:22:3: error: when initialized here [-Werror=reorder] Backlights() : config(NULL), pattern_needs_init(true), off(true), ^ Backlights.h:61:8: error: 'Backlights::off' will be initialized after [-Werror=reorder] bool off; ^ Backlights.h:23:71: error: base 'Adafruit_NeoPixel' [-Werror=reorder] Adafruit_NeoPixel(NUM_DIGITS, BACKLIGHTS_PIN, NEO_GRB + NEO_KHZ800) ^ Backlights.h:22:3: error: when initialized here [-Werror=reorder] Backlights() : config(NULL), pattern_needs_init(true), off(true), ^ C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\Backlights.cpp: In member function 'void Backlights::setIntensity(uint8_t)': Backlights.cpp:51:59: error: suggest parentheses around '-' inside '>>' [-Werror=parentheses] setBrightness(0xFF >> max_intensity - config->intensity - 1); ^ C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\Backlights.cpp: In member function 'void Backlights::loop()': Backlights.cpp:69:76: error: suggest parentheses around '-' inside '>>' [-Werror=parentheses] setBrightness(0xFF >> max_intensity - (BACKLIGHT_DIMMED_INTENSITY) - 1); ^ Backlights.cpp:71:65: error: suggest parentheses around '-' inside '>>' [-Werror=parentheses] setBrightness(0xFF >> max_intensity - config->intensity - 1); ^ C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\Backlights.cpp: In member function 'void Backlights::rainbowPattern()': Backlights.cpp:185:61: error: suggest parentheses around '-' inside '>>' [-Werror=parentheses] setBrightness(0xFF >> max_intensity - config->intensity - 1);
    ^ In file included from C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.cpp:1:0: C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.h: In member function 'bool ChipSelect::isSecondsOnes()': ChipSelect.h:35:71: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] bool isSecondsOnes() { return (digits_map&SECONDS_ONES_MAP > 0); } ^ C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.h: In member function 'bool ChipSelect::isSecondsTens()': ChipSelect.h:36:71: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] bool isSecondsTens() { return (digits_map&SECONDS_TENS_MAP > 0); } ^ C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.h: In member function 'bool ChipSelect::isMinutesOnes()': ChipSelect.h:37:71: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] bool isMinutesOnes() { return (digits_map&MINUTES_ONES_MAP > 0); } ^ C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.h: In member function 'bool ChipSelect::isMinutesTens()': ChipSelect.h:38:71: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] bool isMinutesTens() { return (digits_map&MINUTES_TENS_MAP > 0); } ^ C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.h: In member function 'bool ChipSelect::isHoursOnes()': ChipSelect.h:39:71: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] bool isHoursOnes() { return (digits_map&HOURS_ONES_MAP > 0); } ^ C:\Users\User\Desktop\latest\EleksTubeHAX-main\EleksTubeHAX\ChipSelect.h: In member function 'bool ChipSelect::isHoursTens()': ChipSelect.h:40:71: error: suggest parentheses around comparison in operand of '&' [-Werror=parentheses] bool isHoursTens() { return (digits_map&HOURS_TENS_MAP > 0); } ^

    opened by Rambotnik87 8
  • BoingBall + FW Backup not displaying anything

    BoingBall + FW Backup not displaying anything

    If I flash the BoingBall, the displays remain all black. On the serial I can see the fps numbers though.

    I also tried flashing your original firmware: same result, black displays. The fw dump from my clock looks a bit different in some places. https://github.com/saschaludwig/EleksTubeHAX/blob/main/original-firmware/fw-backup-4M_sascha.bin

    Any Idea what might be the difference? My PCB says "EleksTube IPS Docker v6.1.11"

    Best regards, Sascha

    opened by saschaludwig 8
  • Original firmware backup does not work on all Elekstube IPS clocks

    Original firmware backup does not work on all Elekstube IPS clocks

    Firstly - thanks for creating the alternate firmware and documenting all the steps - compiled and worked first time.

    I discovered that your original fw-backup-4M.bin does not work on the new EleksTube IPS clock I just received. Fortunately, I had made a backup of my firmware before uploading new Firmware and my backup firmware does restore correctly. I checked multiple times with different baud rates - same results.

    I'm not sure what is different - all the parts look the same as your documented part numbers.

    Please consider adding a Warning for prospective hackers to backup their firmware before uploading new firmware. Someting similar to:

    # backup the firmware from the esp32
    esptool --baud 115200 --port COM3 read_flash 0x0 0x400000 my_fw-backup-4M.bin
    
    opened by neptune2 7
  • Consider adding a license

    Consider adding a license

    Hi and thank you for fully reverse engineering and providing an open-source alternative for the stock software!

    I would like to use your code as the basis of a modification (a so-called usermod) to my WLED project. WLED is an open-source ESP8266/ESP32 project to drive WS2812 and other addressable RGB LEDs with lots of possible lighting effects. It also already has support for NTP, timezones and automatic DST change implemented.

    I would kindly like to ask for permission to re-use parts of your code in that context - of course giving full attribution and linking to this repo.

    opened by Aircoookie 7
  • "DRAM segment data does not fit."

    Users/User/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/xtensa-esp32-elf-gcc -nostdlib -L/Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/lib -L/Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/tools/sdk/ld -T esp32_out.ld -T esp32.project.ld -T esp32.rom.ld -T esp32.peripherals.ld -T esp32.rom.libgcc.ld -T esp32.rom.spiram_incompatible_fns.ld -u esp_app_desc -u ld_include_panic_highint_hdl -u call_user_start_cpu0 -Wl,--gc-sections -Wl,-static -Wl,--undefined=uxTopUsedPriority -u __cxa_guard_dummy -u __cxx_fatal_exception -Wl,--start-group /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/sketch/Backlights.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/sketch/Button.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/sketch/ChipSelect.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/sketch/Clock.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/sketch/EleksTubeHAX.ino.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/sketch/Menu.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/sketch/StoredConfig.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/sketch/TFTs.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Preferences/Preferences.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Adafruit_NeoPixel/esp.c.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Adafruit_NeoPixel/esp8266.c.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Adafruit_NeoPixel/kendyte_k210.c.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Adafruit_NeoPixel/rp2040.c.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/FS/FS.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/FS/vfs_api.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/SPIFFS/SPIFFS.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/TFT_eSPI/TFT_eSPI.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/SPI/SPI.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Time/DateStrings.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Time/Time.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/ETH.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFi.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFiAP.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFiClient.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFiGeneric.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFiMulti.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFiSTA.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFiScan.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFiServer.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/WiFi/WiFiUdp.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/NTPClient/NTPClient.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/DS1307RTC/DS1307RTC.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/libraries/Wire/Wire.cpp.o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/core/core.a -lgcc -lesp_websocket_client -lwpa2 -ldetection -lesp_https_server -lwps -lhal -lconsole -lpe -lsoc -lsdmmc -lpthread -llog -lesp_http_client -ljson -lmesh -lesp32-camera -lnet80211 -lwpa_supplicant -lc -lmqtt -lcxx -lesp_https_ota -lulp -lefuse -lpp -lmdns -lbt -lwpa -lspiffs -lheap -limage_util -lunity -lrtc -lmbedtls -lface_recognition -lnghttp -ljsmn -lopenssl -lcore -lfatfs -lm -lprotocomm -lsmartconfig -lxtensa-debug-module -ldl -lesp_event -lesp-tls -lfd -lespcoredump -lesp_http_server -lfr -lsmartconfig_ack -lwear_levelling -ltcp_transport -llwip -lphy -lvfs -lcoap -lesp32 -llibsodium -lbootloader_support -ldriver -lcoexist -lasio -lod -lmicro-ecc -lesp_ringbuf -ldetection_cat_face -lapp_update -lespnow -lface_detection -lapp_trace -lnewlib -lbtdm_app -lwifi_provisioning -lfreertos -lfreemodbus -lethernet -lnvs_flash -lspi_flash -lc_nano -lexpat -lfb_gfx -lprotobuf-c -lesp_adc_cal -ltcpip_adapter -lstdc++ -lc-psram-workaround -lm-psram-workaround -Wl,--end-group -Wl,-EL -o /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/EleksTubeHAX.ino.elf Multiple libraries were found for "WiFi.h" Used: /Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/WiFi Not used: /private/var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/AppTranslocation/77AA4AAA-DDCC-4DAB-8110-06E51642DA41/d/Arduino.app/Contents/Java/libraries/WiFi /Users/User/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: /var/folders/2n/5bg52f0s13l3kxljs5ylvkx80000gn/T/arduino_build_743203/EleksTubeHAX.ino.elf section .dram0.bss' will not fit in regiondram0_0_seg' /Users/User/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit. /Users/User/Library/Arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-97-gc752ad5-5.2.0/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: region `dram0_0_seg' overflowed by 69656 bytes collect2: error: ld returned 1 exit status Using library Preferences at version 1.0 in folder: /Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/Preferences Using library Adafruit_NeoPixel at version 1.8.0 in folder: /Users/User/Documents/Arduino/libraries/Adafruit_NeoPixel Using library FS at version 1.0 in folder: /Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/FS Using library SPIFFS at version 1.0 in folder: /Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/SPIFFS Using library TFT_eSPI at version 2.3.61 in folder: /Users/User/Documents/Arduino/libraries/TFT_eSPI Using library SPI at version 1.0 in folder: /Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/SPI Using library Time at version 1.6 in folder: /Users/User/Documents/Arduino/libraries/Time Using library WiFi at version 1.0 in folder: /Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/WiFi Using library NTPClient at version 3.2.0 in folder: /Users/User/Documents/Arduino/libraries/NTPClient Using library DS1307RTC at version 1.4.1 in folder: /Users/User/Documents/Arduino/libraries/DS1307RTC Using library Wire at version 1.0.1 in folder: /Users/User/Library/Arduino15/packages/esp32/hardware/esp32/1.0.6/libraries/Wire

    opened by phar 5
  • missing Menu.h?

    missing Menu.h?

    I just checked out the latest.. and there seems to be a header file "Menu.h" missing.. unless I've got something jolly wrong here (which, tbh, is pretty likely knowing me)

    I don't know if raising an issue like this is the right thing to do... I couldn't find any way of leaving a comment.

    jont

    opened by jont-studioj 5
  • BoingBall+EleksTube general

    BoingBall+EleksTube general

    Forgive me if this the wrong place / wrong way to get in touch.

    I recently got the EleksTubeIPS and am interested in its hacking capability.

    I have followed with interest (if not wholly absorbed) the discussion thread on Reddit.

    It seems you people have already gotten a long way forward, nice work.

    I am a developer - but I'm now old and my brain isn't as spritely as it once was, I'd love to contribute (and still could) but fear I may be more of a hindrance than a help (as you are about to find out!)

    I have done very little in the way of dealing with micro-controller projects (I've done just one Arduino project some years back) and have little experience in dealing with interface chips / libraries etc.

    Riding on the shoulders of you good folk I have managed to check out the bouncing ball project and successfully got that built, running and (most importantly) restored the clock to its original f/w, using your instructions (and the "font-editor's" copy of esptool.exe, on Windows). Phew.

    Wishing to see what can be done - and as a way to familiarise myself with the environment etc - I decided to see if could hack at the bouncing ball sketch to make it do something different.

    C/C++ isn't my choice language (far far from it, I've managed to avoid those throughout my career - tbh, I actively dislike them!) so this would've been some bit of a way of forcing myself to learn a bit and get more familiar. But really, I am playing and not doing anything particularly useful. Yet.

    Hacking at the code I came across an issue which I am struggling to overcome (I'm not expecting anyone to hand-hold me) but this issue has prompted me to write this text now.

    I was struggling with the generation of graphics and the blitting of data to the displays, via the TFT_eSPI library. After much struggling trying and failing to get colours and stuff right.. I double checked the display/interface as described on https://www.aliexpress.com/item/32564432870.html and noticed that it says "Display Color: 262K"... and after some quick investigation this lead me to believe that the display takes 6bits per colour per pixel? rrrrrrbbbbbbgggggg (or whichever way round it really is)... which makes 18bits per pixel... I then peeked into the TFT_eSPI library/headers which seemed (at least on casual reading) to suggest it deals with 1 4 or 8 bits per colour per pixel - and has nice 8bit/16bit data-size/buffer-size/boundaries for many of its functions.

    Thinking that I want to send 135 pixels (a single display row) of 18 bits per pixel down to the display (or its controller chip or whatever) doesn't go nicely into any nice boundary/buffer-size of some byte/int or whatever.. hmm.. and this shows up even where I flail with c/c++! but never-mind.

    ( specifically a line like: tft.pushPixelsDMA(&renderbuf[bufIdx][0], SCREENWIDTH); and the preparation of said buffer etc )

    It's quite possible that I am missing something.. but I wondered whether the TFT_eSPI library code is actually capable of driving this display sensibly?

    Again, not familiar with how these things are done generally (or, indeed, I haven't read enough), is it the case that lots of code (including the library) can deal with nice power-of-two sized pixels/buffers (with the 6 bits of each colour padded out to a byte with zeros) and it goes all the way through that way until it reaches the actual display (or its controller)... where it is finally converted to the required 18bpp.. and that I shouldn't myself be trying to pack 3 colours of each 6-bits for a pixel spreading over a non-integer number of bytes inside buffers etc? Or is there a fundamental incompatibility between the library and the ultimate display?

    Sorry for what might seem like dumb questions but I am somewhat flummoxed at the moment. Happy to delve further and work it out myself.. but not sure where I should be looking.. look harder into the library code? ..investigate the display's controller (ST7789) more? (or both, of course) - or maybe this is a genuine issue. Any clues, advice?

    Regardless of whether you are able (or want) to help me, I'd like to say thank you for the work (investigation & dev) you've put in.

    Many thanks in advance.

    jont

    opened by jont-studioj 5
  • feature request: ability to set ntp source

    feature request: ability to set ntp source

    Hi,

    Please be gentle as I'm not a developer, only a curious tinkerer :-)

    I've taken my time reading the ntpclient source, and I've modified NTPClient.h to point ntp requests to a local ntp server, and it just works!

    How hard would it be to fetch ntp-server value from the dhcp lease and use it on NTPClient? (it is a standard dhcp option 042)

    Thank you for your time, Pedro

    opened by pedrompcaetano 1
  • NTP Sync - Locale settings?

    NTP Sync - Locale settings?

    Sorry if this is the wrong place to post this, I'm very much a n00b when it comes to Arduino. The time sync for me is wrong, I'm trying to set it to London UK but I can't see where to specify the locale? I tried doing the offset via the menu items, but the 15 minute minimal I'd end up 13 minutes off the correct time.

    Any help greatly appreciated! :)

    opened by TheAnticitizen1 1
  • Turn off backlights when toggling power.

    Turn off backlights when toggling power.

    I recognize that this could be configured as an option quite easily, but I think off means off is a reasonable behavior.

    (It also matches that of the original firmware.)

    opened by LoganK 1
  • idea for optimization of images preload

    idea for optimization of images preload

    hi, pardon me I am esp32/arduino noob and I have no idea how much ram is available there for use, but I have an idea how to optimize images buffering, if only we can fit that in the memory. Basically - always keep number "0" in the one buffer and swap other numbers in another buffer. (so we need to buffer 2 numbers, where 0 is always in-memory) That way we might almost completely eliminate the lag when numbers switch on every second, because if I am not mistaken, only one digit changes every full minute to a non-zero number, the rest to the right is going to be filled with 0.

    opened by falkenhawk 0
  • 1, 4, and 8 bit per pixel BMP support

    1, 4, and 8 bit per pixel BMP support

    This adds support for three BMP formats with 1, 4 and 8 bits per pixel. They use a color palette to determine the RGB888 color, each pixel only stores its palette index, which drastically reduces file sizes. These formats are standardized and can easily be generated with e.g. paint.net. Which one should be preferred depends on the clockface, for simple monochrome ones, the 1 BBP format is enough and needs only ~5% of the size of a 24BPP BMP file!

    UNTESTED I've only verified this code as part of the WLED usermod and ported it over, please test before merging :)

    | Bits per pixel | File size in kB (for 135x240 img) | % of 24 BPP BMP | Max unique colors | --- | --- | --- | --- | 24 | 98 | 100% | 16M (66K) 16 (.clk) | 64.8 | 66% | 66K 8 | 33.7 | 34% | 256 4 | 16.4 | 17% | 16 1 | 4.9 | 5% | 2

    Comparison 1 vs. 4 vs. 8 vs. 24 BPP. With this clockface on the clock, 4 bit looks good, and 8 bit is almost indistinguishable from 24 bit.

    comparison

    opened by Aircoookie 0
  • печатка

    печатка

    здравствуйте! Мне очень понравился ваш проект! И чень хочется собрать самостоятельно такие часики, во время сборки естественно, будут и вопросы. можно будет вам здесь их задавать ? и можно мне их собрать? можно будет у вас попросить печатные платы ?

    opened by Yevgeniy135 9
  • What to do for ESP32-S2 Wroom?

    What to do for ESP32-S2 Wroom?

    My clock has the newer S2 Wroom chip and I might be missing something but it wouldn't compile for that board. Maybe I'm missing something? I tried uploading the compiled firmware, however on boot the serial output says that it's the wrong bootloader. Cheers!

    opened by zsoltmar 4
  • Merging my stuff

    Merging my stuff

    Hi u/SmittyHalibut, u/RedNax67, would you like to help me merge my changes with the repository? I'm thinking it would look like this:

    ElecksTubeHAX - split-out the Web UI into a web.h, web.cpp module, add support for backlights during the slide show.

    TFT.h, TFT.cpp - added the JPEG decoder and slide side animation

    Clock.h, clock.cpp - change error messages when needed image files not available

    StoredConfig.h, StoredConfid.cpp - added setting to remember the slide show, video show, and clock settings on restart

    wifi_creds.h - use to set the default Wifi values, and present it in the Web UI

    menu.h, menu.cpp - keep for people wanting to use the buttons. The Web UI doesn't do anything with the menu features

    And incorporate Aircookie's WLED mod.

    What do you think?

    -Frank

    opened by frankcohen 5
Owner
Mark Smith
Electronics and ham radio geek (KR6ZY), music lover and audiophile, father, husband, aspiring Bond Villain.
Mark Smith
Flutter-Clock-and-Reminder-App - a highly functional clock and reminder app developed on flutter framework.

clock_app A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if thi

Umar Baloch 6 Aug 4, 2022
#PICOmputer - World first Raspberry RP2040 PICO - QWERTY & IPS devkit

PICOmputer #PICOmputer - World first Raspberry RP2040 PICO - QWERTY & IPS devkit https://www.pcbway.com/project/shareproject/_PICOmputer____World_firs

Peter Misenko 47 Aug 13, 2022
Design and firmware for a stepper motor retrofit to the often-failed AC synchronous flip clock motors

StepperFlipClock Design and firmware for a stepper motor retrofit to the often-failed AC synchronous flip clock motors. Flip clocks, perhaps most icon

Dan Ellis 2 Jun 11, 2022
Custom firmware for Quicko and KSGER T12 soldering stations

STM32 Soldering Station Firmware Project details Compatibility Operations guide Frequently asked questions Building Creating a .ioc file from scratch

null 173 Aug 6, 2022
A simple utility for loading custom firmware onto the PS5 camera, using libusb.

A simple utility for loading custom firmware onto the PS5 camera, using libusb.

Raleigh Littles 16 Aug 11, 2022
Toolchain and dockerfile to build the Miyoo Custom Firmware (CFW)

Miyoo Toolchain Toolchain and dockerfile to build the Miyoo Custom Firmware (CFW) See https://github.com/TriForceX/MiyooCFW/wiki/Build-Source for more

Nathan Friedly 3 Aug 5, 2022
Custom BLE firmware for Hanshow E-Paper Shelf Labels / Price Tags

ATC_TLSR_Paper Custom BLE firmware for Hanshow E-Paper Shelf Labels / Price Tags using the TLSR8359 ARM SOC You can support my work via PayPal: https:

null 73 Aug 9, 2022
A custom, freestanding, experimatal kernel / firmware for the n3ds

A little experiment where I build a toy kernel for the new nintendo 3ds (n3ds).

V01D 7 Mar 16, 2022
ESP32 based DIY word clock project

Wordclock ESP32 based DIY wordclock project TL;DR: check out this ✨ demo video ✨ Another take on the classic DIY word clock. This one requires a laser

null 35 Feb 14, 2022
A clock with 241 RGB LEDs

LEDCircleClock A clock with 241 RGB LEDs. Description The clock shows the hands in diferent colors on the grid of LEDs. To make it more beautiful hand

null 17 Feb 26, 2022
A large mechanical 7-segment clock using cheap stepper motors.

mechanical-7-segment-clock A large mechanical 7-segment clock using cheap stepper motors. Each digit requires its own controller board. The seconds di

null 44 Aug 1, 2022
Weather clock with automatic time synchronization

Clock with weather and automatic time synchronization Features Display The numbers are written in a font similar to handwritten; The change of numbers

Anton Petrusevich 4 Apr 1, 2022
Arduino-compatible development platform whose primary function is a clock

MakeTime Arduino-compatible development platform whose primary function is a clock Description MakeTime is a clock that uses a ring of 24 RGB LEDs to

null 3 Oct 11, 2021
ESP32 based Desktop Clock

ESP32_Desktop_Clock ESP32 based Desktop Clock This ESP32 internet of things desktop clock is a project created for my home. School has started and fal

Mike Rankin 69 Aug 4, 2022
An NTSC/PAL version of the 80s Dali Clock for the ESP32

esp32-dali-clock This is an ESP32 recreation of the "Dali" digital clock where the digits "melt" into one another. Watch a full demonstration on YouTu

Marcio T. 95 Aug 4, 2022
DIY Word Clock ver. 1.01

DIY Word Clock ver. 1.01

Vladislav 55 Feb 22, 2022
Display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together

The display array is a board that sets 6 ST7735 display with a resolution of 80x160px in a linear array sharing the clock, data, rs, backlight pins together, and leaving individual access to the cs lines of each display, This board allows you to display images with a resolution of 480x160px.

Josue Alejandro Gutierrez 62 Jul 18, 2022
Clock multiplier / divider / beatshifter

Clock multiplier / divider / beatshift The original code by a773 (atte.dk) (released under the GPL licence) provided alternate firmware for the ginky

Rohan Mitchell 11 Jul 14, 2022
A ESP32 clock / display using 64x32 HUB75 panels.

ESP32 HUB Panel A ESP32 clock / display using 64x32 HUB75 panels. This is a very hacky code that will display a clock in two 64x32 HUB75 LED Matrix Pa

Lucas Teske 20 May 12, 2022