This commit is contained in:
赵鑫 2022-09-05 10:44:21 +08:00
parent af6f38b2da
commit 390f4b4c14

View File

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