# LED

The `LED` command controls the RGB LED on the front of the Packet Squirrel.

## Options

`LED [color] [pattern]`

`LED [state]`

### Colors

<table><thead><tr><th width="105">Color</th><th>Result</th></tr></thead><tbody><tr><td>R</td><td>Red</td></tr><tr><td>G</td><td>Green</td></tr><tr><td>B</td><td>Blue</td></tr><tr><td>Y</td><td>Yellow (Red + Green)</td></tr><tr><td>C</td><td>Cyan (Green + Blue)</td></tr><tr><td>M</td><td>Magenta (Red + Blue)</td></tr><tr><td>W</td><td>White (Red + Blue + Green)</td></tr></tbody></table>

### Patterns

<table><thead><tr><th width="145">Pattern</th><th>Result</th></tr></thead><tbody><tr><td>SOLID</td><td>No blinking (default)</td></tr><tr><td>SLOW</td><td>Slow symmetric blinking (1 second ON, 1 second OFF)</td></tr><tr><td>FAST</td><td>Fast symmetric blinking (100ms ON, 100ms OFF)</td></tr><tr><td>VERYFAST</td><td>Very fast symmetric blinkig (10ms ON, 10ms OFF)</td></tr><tr><td>SINGLE</td><td>1 100ms blink ON, 1 second OFF, repreating</td></tr><tr><td>DOUBLE</td><td>2 100ms blinks ON, 1 second OFF, repeating</td></tr><tr><td>TRIPLE</td><td>3 100ms blinks ON, 1 second OFF, repeating</td></tr><tr><td>QUAD</td><td>4 100ms blinks ON, 1 second OFF, repeating</td></tr><tr><td>QUIN</td><td>5 100ms blinks ON, 1 second OFF, repeating</td></tr><tr><td>ISINGLE</td><td>1 100ms blink OFF, 1 second ON, repeating</td></tr><tr><td>IDOUBLE</td><td>2 100ms blinks OFF, 1 second ON, repeating</td></tr><tr><td>ITRIPLE</td><td>3 100ms blinks OFF, 1 second ON, repeating</td></tr><tr><td>IQUAD</td><td>4 100ms blinks OFF, 1 second ON, repeating</td></tr><tr><td>IQUIN</td><td>5 100ms blinks OFF, 1 second ON, repeating</td></tr><tr><td>SUCCESS</td><td>1 second VERYFAST, followed by SOLID</td></tr></tbody></table>

### States

Instead of setting a color+pattern, the `LED` command can also be used to set a standard color code for a state.

| State    | Pattern    |
| -------- | ---------- |
| SETUP    | M SOLID    |
| FAIL     | R SLOW     |
| FAIL1    | R SLOW     |
| FAIL2    | R FAST     |
| FAIL3    | R VERYFAST |
| ATTACK   | Y SINGLE   |
| STAGE1   | Y SINGLE   |
| STAGE2   | Y DOUBLE   |
| STAGE3   | Y TRIPLE   |
| STAGE4   | Y QUAD     |
| STAGE5   | Y QUIN     |
| SPECIAL  | C ISINGLE  |
| SPECIAL1 | C ISINGLE  |
| SPECIAL2 | C IDOUBLE  |
| SPECIAL3 | C ITRIPLE  |
| SPECIAL4 | C IQUAD    |
| SPECIAL5 | C IQUIN    |
| CLEANUP  | W FAST     |
| FINISH   | G SUCCESS  |
| OFF      |            |

## Experimenting

You can experiment using the `LED` command live, either in the Web Shell in the web UI, or via `ssh`!

<figure><img src="https://932701053-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F520JUF2JxB2RMXztRVAV%2Fuploads%2Fr0erwtxGEgIb5ZZ4vKIR%2FScreenshot%20from%202023-02-13%2017-25-29.png?alt=media&#x26;token=551832cc-c0b0-4b68-9b65-9d5f9bc190bd" alt=""><figcaption><p>Running the LED command from theweb UI Web Shell.</p></figcaption></figure>

## Examples

```bash
#!/bin/bash

# Title: LED demo
# Description: Set the LED to various states

NETMODE NAT

LED G SOLID
sleep 5
LED SPECIAL5
sleep 5
LED CLEANUP
sleep 5
LED M VERYFAST
```
