setSegments
Sets the segment on the ESP device
Request
The API expects a POST request with the following example JSON body:
{
"segments": [
{
"start": 0,
"len": 300,
"pin": [1],
"rev": true
},
{
"start": 310,
"len": 55,
"pin": [11],
"rev": false
}
]
}
| Name | Type | Description |
|---|---|---|
segments |
array |
Array of all the segments in the device |
start |
int |
Start LED index of the segment |
len |
int |
Length of LEDs in the segment |
pin |
array |
Array of Pin numbers in the segment |
rev |
bool |
Direction of the segment. (Reversed) |
Response
Content-Type: application/json
The API responds with a JSON object containing the following fields:
| Name | Type | Description |
|---|---|---|
message |
string |
Describes the result. |