update
This commit is contained in:
parent
cc010c477c
commit
55243699fd
12
server.js
12
server.js
@ -65,12 +65,12 @@ io.on('connection', (client) => {
|
||||
sensehat.led.clear(color)
|
||||
io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
||||
break
|
||||
// case 'flash':
|
||||
// if (color == undefined) color = [255, 255, 255]
|
||||
// sensehat.led.clear(color)
|
||||
// setTimeout(sensehat.led.clear, delay | 200)
|
||||
// client.emit('action', { action: 'clear' })
|
||||
// break
|
||||
case 'flash':
|
||||
if (color == undefined) color = [255, 255, 255]
|
||||
sensehat.led.clear(color)
|
||||
setTimeout(sensehat.led.clear, delay | 200)
|
||||
client.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels })
|
||||
break
|
||||
// case 'getPixel':
|
||||
// color = sensehat.led.getPixel(x, y)
|
||||
// client.emit('action', { action: 'setPixel', x, y, color })
|
||||
|
Loading…
Reference in New Issue
Block a user