> ## Documentation Index
> Fetch the complete documentation index at: https://docs.researchanddesire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Feedback and Indicators

> LED colors, buzzer sounds, and vibration patterns for RADR

RADR provides visual, audio, and haptic feedback to communicate device state without requiring you to look at the screen.

## LED System

RADR has three RGB LEDs (WS2812B) positioned around the device:

| Position | Location      | Primary Purpose       |
| -------- | ------------- | --------------------- |
| LED 0    | Left encoder  | Speed mode indicator  |
| LED 1    | Middle        | Connection/play state |
| LED 2    | Right encoder | Active mode indicator |

### LED Colors and Meanings

#### System States

| State              | LED    | Color      | HSV Value | Brightness    |
| ------------------ | ------ | ---------- | --------- | ------------- |
| Searching/Scanning | All    | Blue       | 150       | 255 (pulsing) |
| Idle (Main Menu)   | All    | Soft White | 180       | 50            |
| Device Connected   | Middle | White      | —         | 50            |
| Paused/Stopped     | Middle | Red        | —         | 255           |

#### OSSM Control Modes

When controlling an OSSM, the encoder LEDs indicate the active mode:

| Mode      | LED   | Color     | Description                                                |
| --------- | ----- | --------- | ---------------------------------------------------------- |
| Speed     | Left  | Purple    | Always active (speed is always controlled by left encoder) |
| Depth     | Right | Coral/Red | Right encoder is adjusting depth                           |
| Sensation | Right | Blue      | Right encoder is adjusting sensation                       |
| Stroke    | Right | Green     | Right encoder is adjusting stroke                          |

### LED Behavior Patterns

| Pattern     | Meaning                                  |
| ----------- | ---------------------------------------- |
| Solid       | Static state (connected, paused, etc.)   |
| Pulsing     | Active scan or searching                 |
| Quick flash | Feedback for button press or mode change |

## Buzzer Patterns

RADR uses a piezoelectric buzzer (GPIO 2) to provide audio feedback for key events.

### Boot Sound

**Pattern:** 4-note ascending sequence

| Note | Frequency    | Duration |
| ---- | ------------ | -------- |
| 1    | 523 Hz (C5)  | 100ms    |
| 2    | 659 Hz (E5)  | 100ms    |
| 3    | 784 Hz (G5)  | 100ms    |
| 4    | 1047 Hz (C6) | 150ms    |

Played when RADR powers on.

### Shutdown Sound

**Pattern:** 4-note descending sequence

| Note | Frequency    | Duration |
| ---- | ------------ | -------- |
| 1    | 1047 Hz (C6) | 100ms    |
| 2    | 784 Hz (G5)  | 100ms    |
| 3    | 659 Hz (E5)  | 100ms    |
| 4    | 523 Hz (C5)  | 150ms    |

Played when entering sleep mode.

### Device Connected

**Pattern:** 3-note ascending sequence

| Note | Frequency    | Duration |
| ---- | ------------ | -------- |
| 1    | 1047 Hz (C6) | 80ms     |
| 2    | 1319 Hz (E6) | 80ms     |
| 3    | 1568 Hz (G6) | 120ms    |

Played when successfully connecting to a device.

### Device Disconnected

**Pattern:** 3-note descending sequence

| Note | Frequency    | Duration |
| ---- | ------------ | -------- |
| 1    | 1568 Hz (G6) | 80ms     |
| 2    | 1319 Hz (E6) | 80ms     |
| 3    | 1047 Hz (C6) | 120ms    |

Played when a device disconnects.

### Paused

**Pattern:** Double beep

| Note | Frequency | Duration |
| ---- | --------- | -------- |
| 1    | 800 Hz    | 150ms    |
| Gap  | —         | 100ms    |
| 2    | 800 Hz    | 150ms    |

Played when pausing playback.

### Play/Resume

**Pattern:** Two-tone ascending

| Note | Frequency | Duration |
| ---- | --------- | -------- |
| 1    | 1200 Hz   | 100ms    |
| 2    | 1400 Hz   | 100ms    |

Played when resuming playback.

### Mario Coin (Easter Egg)

**Pattern:** Classic coin sound

| Note | Frequency    | Duration |
| ---- | ------------ | -------- |
| 1    | 2637 Hz (E7) | 80ms     |
| 2    | 3136 Hz (G7) | 300ms    |

Special feedback for certain interactions.

## Vibration Feedback

RADR includes a vibration motor (GPIO 47) for haptic feedback. Vibration patterns generally mirror buzzer patterns, providing tactile feedback that works without sound.

### Vibration Use Cases

| Event        | Vibration        |
| ------------ | ---------------- |
| Button press | Short pulse      |
| Mode change  | Quick vibration  |
| Connection   | Double vibration |
| Pause/Stop   | Strong vibration |

### Vibration Pattern Timings

| Pattern             | Description           | Pulse Durations (ms)           |
| ------------------- | --------------------- | ------------------------------ |
| Single Pulse        | Quick tap feedback    | 50                             |
| Double Pulse        | Confirmation feedback | 50, pause 200, 50              |
| Triple Pulse        | Strong confirmation   | 10, pause 50, 20, pause 50, 30 |
| Error Pulse         | Long error indication | 500                            |
| Shutdown            | Descending pulses     | 150, 100, 100, 100             |
| Device Connected    | Ascending pulses      | 100, 100, 150                  |
| Device Disconnected | Descending pulses     | 150, 100, 100                  |
| Paused              | Double pulse          | 150, 150                       |
| Play/Resume         | Quick double pulse    | 100, 100                       |

<Info>
  Vibration feedback helps you operate RADR by feel, especially useful in low-light or when the device is out of direct view.
</Info>

## UI Color Scheme

RADR's display uses a consistent color scheme:

### Background Colors

| Element         | Color Code | Description          |
| --------------- | ---------- | -------------------- |
| Background      | 0x10c5     | Dark gray (Gray 900) |
| Text Background | White      | Primary text color   |
| Secondary Text  | 0xDEFB     | Light gray           |
| Disabled        | 0x1082     | Very dark gray       |

### OSSM Mode Colors

| Mode      | Color Code | Color Name   |
| --------- | ---------- | ------------ |
| Speed     | 0x5013     | Royal Purple |
| Depth     | 0xE186     | Warm Coral   |
| Sensation | 0x3C9F     | Ocean Blue   |
| Stroke    | 0x4E8A     | Forest Green |

### State Colors

| State                | Color         |
| -------------------- | ------------- |
| Active/Normal        | White         |
| Paused/Stopped       | Red           |
| Disabled             | Dark Gray     |
| Selected/Highlighted | Accent colors |

## Feedback Timing

| Event            | Response Time |
| ---------------- | ------------- |
| Button press     | \< 10ms       |
| Encoder change   | \< 10ms       |
| Mode switch      | \< 50ms       |
| LED color change | \< 20ms       |

## Tips for Using Feedback

<Tip>
  Learn the buzzer sounds to operate RADR without looking. The connected sound (ascending) vs disconnected sound (descending) clearly indicates state.
</Tip>

<Tip>
  The left LED (purple for speed) and right LED (mode color) tell you which parameter each encoder controls at a glance.
</Tip>

<Tip>
  Red middle LED always means paused or stopped. White means active and ready.
</Tip>
