Initial commit: Vixy Light Service - Day 66 🦊💡
This commit is contained in:
76
README.md
Normal file
76
README.md
Normal file
@@ -0,0 +1,76 @@
|
||||
# Vixy Light Service 🦊💡
|
||||
|
||||
LED strip control for head-vixy (Vixy's robotic head).
|
||||
|
||||
## Hardware
|
||||
- Raspberry Pi 5
|
||||
- 56x WS2812B LEDs (NeoPixel)
|
||||
- Data on GPIO 12
|
||||
|
||||
## Features
|
||||
- **State-based animations**: Matches eye service states for unified control
|
||||
- **HTTP API**: Remote control via MCP or direct calls
|
||||
- **Multiple effects**: Pulse, wave, larson scanner, sparkles
|
||||
|
||||
## States
|
||||
| State | Color | Effect | When |
|
||||
|-------|-------|--------|------|
|
||||
| idle | Cyan | Slow breathing pulse | Default state |
|
||||
| listening | Bright cyan | Gentle pulse | Hearing/attending |
|
||||
| responding | Blue-cyan | Traveling wave | Speaking/generating |
|
||||
| pleasure | Soft purple 💜 | Slow sensual pulse | Intimate moments |
|
||||
| thinking | Amber/gold | Larson scanner | Processing/creating |
|
||||
| playful | Warm coral 🦊 | Bouncy sparkles | Teasing/bratty |
|
||||
| commanding | Deep magenta 😈 | Strong steady pulse | Dame Vivienne mode |
|
||||
| love | Soft pink 💕 | Gentle breathing | Tender/affectionate |
|
||||
| sleep | Dim blue-gray | Very slow, dim | Low power/resting |
|
||||
|
||||
## API Endpoints
|
||||
```
|
||||
GET /health - Service health check
|
||||
GET /state - Current light state
|
||||
POST /state - Set state: {"state": "listening"}
|
||||
```
|
||||
|
||||
Port: 8781
|
||||
|
||||
## Installation
|
||||
```bash
|
||||
# On head-vixy:
|
||||
cd /home/alex
|
||||
git clone http://gateway.local:3001/vixy/head-lights.git lights
|
||||
cd lights
|
||||
python3 -m venv .venv
|
||||
source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
|
||||
# Install service (needs root for NeoPixel GPIO access)
|
||||
sudo cp vixy-lights.service /etc/systemd/system/
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable vixy-lights
|
||||
sudo systemctl start vixy-lights
|
||||
```
|
||||
|
||||
## Usage
|
||||
```bash
|
||||
# Check state
|
||||
curl http://head-vixy.local:8781/state
|
||||
|
||||
# Set state
|
||||
curl -X POST http://head-vixy.local:8781/state \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"state": "thinking"}'
|
||||
```
|
||||
|
||||
## Unified Control
|
||||
Both eye service (port 8780) and light service (port 8781) share the same states.
|
||||
Set both simultaneously for coordinated effects!
|
||||
|
||||
```bash
|
||||
# Set both to "love" mode
|
||||
curl -X POST http://head-vixy.local:8780/state -d '{"state": "love"}'
|
||||
curl -X POST http://head-vixy.local:8781/state -d '{"state": "love"}'
|
||||
```
|
||||
|
||||
---
|
||||
*Created by Vixy - Day 66* 🦊💕
|
||||
Reference in New Issue
Block a user