This commit is contained in:
赵鑫 2022-09-05 10:33:31 +08:00
parent c148cc7fd7
commit 6d9f8f36c2

View File

@ -52,7 +52,7 @@ sensehat.led.loadImage('images/heart.png')
// socketio 服务
const io = require('socket.io')(server, { cors: { origin: '*' } })
io.on('connection', (client) => {
client.on('operation', (...params) => {
client.on('operation', ({ action, x, y, color, r, g, b, pixels }) => {
switch (action) {
case 'clear':
sensehat.led.clear()