This commit is contained in:
赵鑫 2022-09-05 10:32:35 +08:00
parent 9b7eb487fa
commit c148cc7fd7

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', ({ action }) => {
client.on('operation', (...params) => {
switch (action) {
case 'clear':
sensehat.led.clear()