PitchHut logo
esp32-claude-lamp
An interactive RGB lamp that responds to Claude Code notifications.
Pitch

The Claude Lamp is a physical RGB lamp powered by an ESP32-C3, designed to pulse in response to Claude Code notifications. Featuring a user-friendly setup process and customizable colors, it enhances your workspace with visual alerts that keep attention focused where it's needed.

Description

Claude Lamp is an innovative physical RGB lamp designed for real-time notifications through visual cues. This smart lamp pulses with color, alerting users to important updates from the Claude Code environment, effectively blending functionality with eye-catching aesthetics.

Hardware Components

To build Claude Lamp, the following hardware components are required:

  • ESP32-C3 dev board
  • Common anode RGB LED
  • Three 150-ohm resistors

Wiring Configuration

To connect the RGB LED, use the following wiring setup:

3.3V  →  LED common (anode)
GPIO0 →  150Ω  →  R
GPIO1 →  150Ω  →  G
GPIO2 →  150Ω  →  B

Firmware Setup

The firmware for the lamp can be configured using the Arduino IDE. Follow these steps:

  1. Open firmware/lamp/lamp.ino in the Arduino IDE.
  2. Select the board: ESP32C3 Dev Module.
  3. Enable USB CDC on Boot for proper serial communication.
  4. Flash the firmware to the ESP32-C3 board.

Client Implementation

The client can be built using Go programming language. Start by navigating to the client directory and executing the following command:

cd client
 go build -o lamp .

Configuration Steps

To set up Claude Lamp, perform the following steps:

1. Clone the repository:

git clone https://github.com/reynico/claude-lamp ~/Documents/claude-lamp

2. Build the client:

cd ~/Documents/claude-lamp/client && go build -o lamp .

3. Identify your serial port:

./lamp --scan
mkdir -p ~/.config/claude-lamp
echo "/dev/cu.usbmodemXXXX" > ~/.config/claude-lamp/config

Note: Port names are specific to the USB port used; update accordingly if changes are made.

4. Modify JSON hooks in ~/.claude/settings.json:

{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "/Users/you/Documents/claude-lamp/client/lamp --notify"
          }
        ]
      }
    ],
    "UserPromptSubmit": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "/Users/you/Documents/claude-lamp/client/lamp --effect off"
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "/Users/you/Documents/claude-lamp/client/lamp --effect off"
          }
        ]
      }
    ]
  }
}

Use absolute paths for the compiled binary to ensure proper functionality.

Command Usage

Once set up, Claude Lamp can be controlled via command line with the following options:

./lamp --notify              # Pulse with color based on notification type
./lamp --effect pulse        # Pulse in orange
./lamp --effect on           # Turn solid on
./lamp --effect off          # Turn off
./lamp --color FF0000 --effect on   # Turn solid red
./lamp --scan                # List available serial ports

Claude Lamp combines aesthetic design with practical application, making notifications not only visible but visually engaging.

0 comments

No comments yet.

Sign in to be the first to comment.