About the project

Inspiration

Pocket C6 started with a simple question: Can a tiny ESP32-C6 development board become a genuinely useful pocket companion?

The board has a small touchscreen, motion sensor, Wi-Fi, Bluetooth, and a bright LCD. Instead of building just another sensor demo, we wanted to combine these capabilities into one cohesive, interactive device that feels more like a miniature personal computer.

What it does

Pocket C6 is a compact touchscreen companion featuring:

  • A landscape clock with automatic time synchronization
  • Four-way physical orientation support
  • Touch gestures for navigation
  • Calendar with month browsing
  • Hangzhou weather and five-day forecasts
  • Notification and widget pages
  • BLE mouse and keyboard mode
  • Touchpad gestures, scrolling, right-click, double-click, and drag selection
  • Shake-controlled dice and rock-paper-scissors games
  • Lock mode with reduced frame rate and automatic dimming
  • Chinese text rendering optimized for the small display
  • Smooth scroll and transition animations

How we built it

The project is written in Rust and runs directly on the ESP32-C6 using ESP-IDF.

The main architecture consists of:

  • A Rust application layer for state management and services
  • LVGL for the graphical user interface
  • Custom SPI display driver for the JD9853 LCD
  • I²C drivers for the AXS5106L touch controller and QMI8658 IMU
  • Bluetooth HID services for mouse and keyboard functionality
  • Wi-Fi and SNTP for connectivity and time synchronization
  • A domestic weather API for Hangzhou forecasts
  • Host-side Rust model tests for gesture, calendar, orientation, and game logic

The UI is organized around pages and applications. Touch gestures control navigation, while individual apps can temporarily take ownership of gestures for focused interactions such as touchpad control or games.

Challenges we ran into

The biggest challenge was adapting every interaction to a 172×320 display. Text, icons, calendars, weather cards, and application tiles all had to remain readable without wasting screen space.

Other challenges included:

  • Correctly mapping touch coordinates across four physical orientations
  • Avoiding conflicts between screen gestures and touchpad gestures
  • Making two-finger scrolling and right-click reliable
  • Improving cursor smoothness despite limited touch sampling
  • Rendering Chinese characters consistently with a compact embedded font
  • Controlling LCD brightness and frame rates to reduce heat
  • Handling the board’s unusual pinout and shared SPI/I²C buses
  • Designing safe BOOT-button exit flows that prevent accidental app exits
  • Working around certificate verification issues with external weather services

Accomplishments that we're proud of

We are proud that Pocket C6 evolved from a hardware test program into a small, coherent operating environment.

The most satisfying achievements are:

  • A complete LVGL interface running on the ESP32-C6
  • Reliable BLE touchpad, mouse, and keyboard interactions
  • Automatic screen rotation based on physical orientation
  • Smooth, gesture-driven navigation
  • Usable Chinese UI text on a very small screen
  • Low-power lock mode with automatic brightness reduction
  • Multiple interactive applications sharing one consistent UI model
  • Host-testable Rust logic for hardware-independent behavior

What we learned

We learned that embedded UI development is a balance between hardware constraints and interaction design. A feature that is trivial on a phone can require careful sampling, state tracking, coordinate transforms, and power management on a microcontroller.

We also learned the value of separating pure application logic from hardware drivers. By keeping gesture recognition, calendar calculations, orientation classification, and game rules testable on a desktop, we could iterate much faster and reduce regressions.

What's next for Pocket C6

Future plans include:

  • More small applications and utilities
  • Persistent user settings
  • More efficient sleep and wake behavior
  • Additional BLE HID profiles
  • Better animation timing and graphics
  • Expandable weather and notification providers
  • More polished iconography and themes
  • Optional voice and audio experiments if supported by the hardware

Built With

  • esp-idf
  • esp-idf-svc
  • esp32-c6
  • i?c
  • lvgl
  • qmi8658
  • rust
  • sntp
  • spi
Share this project:

Updates