我们需要关于如何使用 websocket 和 fadecandy 服务器来映射 64 个 LED 灯条的帮助。
这是 fadecandy 服务器中的映射
服务器配置 JSON:
{
"listen": [ null, 7890 ],
"verbose": true,
"color": {
"gamma": 2.5,
"whitepoint": [ 0.7, 0.7, 0.7 ]
},
"devices": [
{
"type": "fadecandy",
"serial": "YSEELLIWMMPNTTUT",
"map": [
[ 0, 0, 0, 60 ],
[ 0, 60, 64, 60 ],
[ 0, 120, 128, 60 ],
[ 0, 180, 192, 60 ],
[ 0, 240, 256, 60 ],
[ 0, 300, 320, 60 ],
[ 0, 360, 384, 60 ],
[ 0, 420, 448, 60 ]
]
},
{
"type": "fadecandy",
"serial": "IMOQHJFLPHOVWJUD",
"map": [
[ 0, 480, 0, 60 ],
[ 0, 540, 64, 60 ],
[ 0, 600, 128, 60 ],
[ 0, 660, 192, 60 ],
[ 0, 720, 256, 60 ],
[ 0, 780, 320, 60 ],
[ 0, 840, 384, 60 ],
[ 0, 900, 448, 60 ]
]
},
{
"type": "fadecandy",
"serial": "KEEODXMCGEVDJHIZ",
"map": [
[ 0, 960, 0, 60 ],
[ 0, 1020, 64, 60 ],
[ 0, 1080, 128, 60 ],
[ 0, 1140, 192, 60 ],
[ 0, 1200, 256, 60 ],
[ 0, 1260, 320, 60 ],
[ 0, 1320, 384, 60 ],
[ 0, 1380, 448, 60 ]
]
}
]
}
我们如何使用 fadecandy 服务器映射到 websocket?