update
This commit is contained in:
parent
9b7eb487fa
commit
c148cc7fd7
@ -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 }) => {
|
client.on('operation', (...params) => {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 'clear':
|
case 'clear':
|
||||||
sensehat.led.clear()
|
sensehat.led.clear()
|
||||||
|
Loading…
Reference in New Issue
Block a user