HackyLens provides a compact on-device environment for camera experiments, QR scanning, face detection, file browsing, diagnostics, and small interactive apps.
Warning
Flashing custom firmware replaces the firmware currently installed on the device. Make sure you are comfortable entering the K210 bootloader and restoring your preferred firmware before proceeding.
Development and hardware testing were performed on the DFRobot HUSKYLENS SEN0305. Other HUSKYLENS revisions may differ, so verify the board, flash layout, and pin mapping before using this firmware on another revision.
- Live OV2640 camera preview with configurable capture and display settings
- QR scanning powered by quirc
- KPU-based face detection
- FAT32 SD-card support, photo capture, screenshots, and an image viewer
- On-device terminal with bounded history and scrolling
- Built-in file browser, button tester, Pong, settings, and sleep mode
- Compile-time app registry: omit individual apps from custom builds
- UART tooling for flashing, logs, commands, LCD screenshots, and raw camera frames
- Layered C codebase with an automated architecture-boundary check
| Main menu | Live camera | Settings |
|---|---|---|
![]() |
![]() |
![]() |
These 320 x 240 images were captured directly from a running HUSKYLENS over the firmware's UART screenshot protocol.
TERMINAL, CAMERA, QR-CAMERA, FACE DETECT, FILES, BUTTONS, PONG, SETTINGS, and SLEEP
The bootstrap script currently provisions the Windows Kendryte toolchain. Run the following commands from the repository root in PowerShell.
- Git
- Python 3
- CMake
- Ninja
- A MinGW-compatible build environment
Install the Python serial dependency:
python -m pip install pyserialDownload the Kendryte SDK, toolchain, and flashing support files, then load the generated environment:
python tools\bootstrap_deps.py
. .\env.ps1
python tools\check_env.pyRun the architecture check and build the full firmware:
python tools\check_arch.py
python tools\build_firmware.py fullThe firmware image is written to build\hackylens.bin. Packaged image metadata is written to dist\.
Apps can be excluded by repeating --disable-app:
python tools\build_firmware.py full --disable-app pong --disable-app terminalThere are three ways to install firmware:
- HLWF Desktop — an offline Windows x64 flasher with package validation, progress reporting, and recovery support.
- HLWF — a dependency-free browser uploader built on Web Serial.
tools/hkflash.py— the repository's Python flashing and debug tool, intended for development workflows.
List detected serial adapters:
python tools\hkflash.py listFlash the image and monitor the boot log:
python tools\hkflash.py flash-monitor build\hackylens.bin --port COM10Capture the current LCD contents without a camera or screen-grabber:
python tools\hkflash.py screenshot --port COM10 --output screen.bmpDebug commands can also open firmware screens directly; for example:
python tools\hkflash.py cmd HKSETTINGS --port COM10Run python tools\hkflash.py --help or the help for an individual subcommand to see reset, baud-rate, verification, monitor, command, and frame-capture options.
| Path | Purpose |
|---|---|
firmware/src/apps |
App entry points and self-contained feature modules |
firmware/src/controllers |
User flows and screen coordination |
firmware/src/services |
Camera, QR, settings, debug, and screenshot services |
firmware/src/storage |
FAT32, files, images, photos, and persistent data |
firmware/src/ui |
Screen rendering |
firmware/src/drivers, board, hal |
Hardware-facing code |
firmware/src/runtime |
Startup and the main loop |
tools |
Dependency bootstrap, build, checks, flashing, and diagnostics |
More detail is available in Architecture, Modules, App lifecycle, and RAM/flash budget.
HackyLens is released under the MIT License.



