This repo documents the LCD interface inside the HelloCubic Lite cube (ESP8266) from GeekMagicClock
It also comptabile with the Smalltv-Ultra from GeekMagicClock
- Important information
- Teardown
- Screen hardware configuration
- How the screen works
- What's next ?
- The firmware
- Install guide
- License
- Support
Warning: I am not responsible for bricking your devices. Flash at your own risk
I recommend making a complete backup of your flash before doing anything I've upload my factory backup (version 7.0.17 for cube and 9.0.40 for small tv); it might be useful. Backup tested and approved, it works
Version i've bought :
- MCU: ESP8266
- LCD controller: ST7789 (RGB565)
- Case: 3d printed
- Controller: ST7789
- Resolution: 240x240 pixels
- Color Format: RGB565 (16-bit color)
- Interface: SPI (Serial Peripheral Interface)
- SPI Speed: up to 80 MHz (40 MHz is more stable)
- Rotation: Upside-down for cube display, normal for the small tv
The wiring is the same form small TV and cube
The display is connected to the ESP8266 using the following GPIO pins:
| Function | GPIO Pin | Description |
|---|---|---|
| MOSI | GPIO 13 | SPI Master Out Slave In (data from ESP8266 to screen) |
| SCK | GPIO 14 | SPI Clock |
| CS | GPIO 2 | Chip Select (Active HIGH) |
| DC | GPIO 0 | Data/Command select (LOW=command, HIGH=data) |
| RST | GPIO 15 | Reset pin |
| Backlight | GPIO 5 | Backlight control (Active LOW) |
Chip select (CS) polarity: This board uses active-high CS, which is non-standard. Most SPI displays use active-low CS. The CS pin must be driven HIGH to select the display
SPI mode: SPI Mode 0 (CPOL=0, CPHA=0)
Data/command pin: LOW for commands, HIGH for data
Backlight: Active-low control - set GPIO 5 LOW to turn the backlight on, HIGH to turn it off
- Backlight control: GPIO 5 is set as output and driven LOW to turn on the backlight
- Hardware reset: The RST pin (GPIO 15) is toggled to reset the ST7789 controller
- SPI bus setup: Hardware SPI is initialized with 80 MHz clock speed and Mode 0
- Display controller init: The ST7789 is configured using a vendor-specific initialization sequence that includes:
- Sleep out (0x11)
- Porch settings (0xB2)
- Tearing effect on (0x35)
- Memory access control/MADCTL (0x36)
- Color mode to 16-bit RGB565 (0x3A)
- Various power control settings (0xB7, 0xBB, 0xC0-0xC6, 0xD0, 0xD6)
- Gamma correction settings (0xE0, 0xE1, 0xE4)
- Display inversion on (0x21)
- Display on (0x29)
- Full window setup and RAMWR command (0x2A, 0x2B, 0x2C)
- Rotation aplied: Display rotation is set to mode 4 for proper orientation with cube
The display uses SPI protocol for communication:
- Chip select: CS is driven HIGH to select the display
- Command/data mode: The DC pin indicates whether the data on MOSI is a command (DC=LOW) or pixel data (DC=HIGH)
- Data transfer: Data is shifted out on the MOSI pin, synchronized with the SCK clock signal
- Chip deselect: CS can be kept HIGH during continuous operations for better performance, or dropped LOW between operations
The firmware uses the Arduino_GFX library with a custom ESP8266SPIWithCustomCS bus driver that handles the active-high CS polarity. Graphics operations:
- Begin write: Assert CS (set HIGH)
- Write commands: Set DC LOW, send command bytes via SPI
- Write data: Set DC HIGH, send pixel data via SPI
- End write: Optionally deassert CS (set LOW) - can be kept asserted for continuous operations
Colors are encoded in RGB565 format (16-bit):
- Red: 5 bits (bits 15-11)
- Green: 6 bits (bits 10-5)
- Blue: 5 bits (bits 4-0)
Example colors:
- Black: 0x0000
- White: 0xFFFF
- Red: 0xF800
- Green: 0x07E0
- Blue: 0x001F
- High SPI speed: 80 MHz clock for fast data transfer
- CS kept asserted: During continuous operations, CS stays HIGH to reduce overhead
- Hardware SPI: Uses ESP8266's hardware SPI peripheral for efficient transfers
- Batch writes: Multiple operations are batched between beginWrite/endWrite calls
- Direct frame buffer writes: GIF frames are streamed directly to avoid intermediate buffering
Okay, now we have a minimal firmware that works.
I really like ESP devices and I really enjoy working with ESP-IDF, so I’m planning if possible (I haven’t checked compatibility yet, I’m still new to this world) to create a firmware close to the original one in terms of features, but fully open source ofc \o/
Since ESP IDF is not compatible with esp8266, i'm going to build the firmware on top of plateformIO
That’s the project, at least
This is the "real" firmware I want to improve, with clean and reliable code
| Component | Technology / Library | Main Role |
|---|---|---|
| Microcontroller | ESP8266 (esp12e) | Main hardware platform |
| Build environment | PlatformIO | Project management, build, upload |
| Framework | Arduino Framework | Software base for ESP8266 |
| Filesystem | LittleFS | Local storage LittleFS |
| Graphics display | Arduino_GFX Library | ST7789 display management (SPI, RGB565) |
| Web UI (frontend) | Pico.css, Alpine.js | Minimalist web user interface |
To use the open-source firmware on your compatible GeekMagic device, follow these steps:
git clone https://github.com/Times-Z/GeekMagic-Open-Firmware.gitcp data/config-{hellocubic|smalltv}.example data/config.jsonYou can edit this JSON file to configure your firmware, for example by modifying wifi_ssid and wifi_password so that your device connects to your network
To build the firmware you can use decontainer, docker or build it by yourself using PlateformIO
pio run && pio run --target buildfs
# or using devcontainer aliases
build && buildfs
# or docker
./scripts/build-with-docker.shThe generated files will be located in:
.pio/build/esp12e/
There are two possible flashing methods:
- OTA (Over-The-Air) – no prerequisites
- USB – requires a USB-to-TTL converter to connect to the ESP
Flashing is done in two steps
Go to:
http://{your_geekmagic_ip}/update
This is the update endpoint of the original firmware. Upload the firmware.bin file
Once this step is complete, the device will reboot. Depending on the model, the screen orientation may be correct or not — this is normal
At this point, only the firmware has been flashed. The filesystem (configuration, web app) still needs to be flashed
The firmware will create a Wi‑Fi access point with the following credentials:
- SSID:
GeekMagic - Password:
$str0ngPa$$w0rd
Connect to this access point and go to:
http://192.168.4.1/legacyupdate
From there, select and flash the filesystem using the littlefs.bin file
Once the device reboots, the setup is complete!
This project is licensed under the MIT License - see the LICENSE file for details
- Found a bug or question ? Open an issue
Made with ❤️
Star us on GitHub if you find this project useful !
This project took me a lot of time !




