diff --git a/server.js b/server.js index e2202d1..daf7e67 100644 --- a/server.js +++ b/server.js @@ -105,11 +105,11 @@ io.on('connection', (client) => { io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels }) break case 'turnLeft': - sensehat.led.rotation = ((sensehat.led.rotation - 90) + 360) % 360 + sensehat.led.setRotation(((sensehat.led.rotation - 90) + 360) % 360) io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels }) break case 'turnRight': - sensehat.led.rotation = (sensehat.led.rotation + 90) % 360 + sensehat.led.setRotation((sensehat.led.rotation + 90) % 360) io.emit('action', { action: 'setPixels', pixels: sensehat.led.pixels }) break // case 'on':