nemo.foo

DeskThang

2025-01-26

HardwarePCBZigEmbeddedElectronics

DeskThang

A USB-connected desk companion that helps maintain focus by bringing important notifications directly to your workspace, without the distractions of phones or chat apps.

The Problems

  1. Notification Overload: Modern devices bombard us with notifications everywhere, making it difficult to maintain focus and separate work from personal life.
  2. Authentication Friction: Tools like GitLab’s MFA, while necessary, create constant workflow interruptions.
  3. IoT Security Concerns: Traditional IoT devices with WiFi chips introduce unnecessary security risks and complexity.

The Solution

DeskThang is a USB-connected device that:

  • Features a 240x240 pixel circular LCD screen and programmable RGB LEDs
  • Connects via USB-C with no wireless components
  • Is completely scriptable through bash commands
  • Provides visual feedback for:
    • CI/CD pipeline status
    • Payment notifications
    • System status indicators
    • Custom notifications
    • And more through simple scripting

Technical Stack

  • Host Driver: Written in Zig for efficient USB communication
  • Firmware: C code running on the RP2040 (Raspberry Pi Pico)
  • Scripting: Python for easy customization and integration
  • Hardware:
    • RP2040 microcontroller
    • 240x240 circular LCD display
    • RGB LEDs
    • USB-C connection

Design Philosophy

  1. Location-Based Computing: Notifications appear only where they’re relevant - work notifications stay in the office.
  2. Security First: No wireless connectivity means fewer attack vectors and security concerns.
  3. Open Hardware: Complete documentation for firmware updates and hardware hacking included.
  4. Ultimate Scriptability: Simple bash commands enable endless customization possibilities.

Command Interface

DeskThang provides a straightforward command-line interface:

# Basic Commands
deskthang ping              # Send ping command (expects pong response)
deskthang test <1-4>       # Run test pattern 1-4
deskthang led <RRGGBB>     # Set LED color (hex format)
deskthang image path/to.png # Display image (240x240 png)

These simple commands can be combined with other tools to create powerful automations. For example:

# Turn LED red on failed GitLab pipeline
gitlab-ci-notifier on:failed "deskthang led FF0000"

# Display team logo during standups
at 9:00 "deskthang image ~/team-logo.png"

Current Status

This project is actively under development, with focus on:

  • Implementing reliable USB communication protocols
  • Developing the state machine for robust data transfer
  • Creating a user-friendly command interface
  • Designing the final PCB

Follow the development blog for detailed insights into the challenges and progress of building DeskThang.

~/subscribe
$ Stay updated with my latest projects, blog posts, and maker adventures.