From c1e330bc545bef09ed32063e0c2ff88ba28f22a2 Mon Sep 17 00:00:00 2001 From: nau Date: Tue, 21 Jun 2016 19:55:51 +0200 Subject: [PATCH] prova3 amb raspberry --- server.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.js b/server.js index 0464f83..4e4c9cc 100755 --- a/server.js +++ b/server.js @@ -30,7 +30,7 @@ io.on('connection', function (socket) { socket.on('newconnection', function (data,callback){ numconnections++; console.log("numconnections: " + numconnections); - io.sockets.emit('numconnections',{numconnections}); //aqí envia la data + //io.sockets.emit('numconnections',{numconnections}); //aqí envia la data }); socket.on('pinON', function (data,callback){ console.log(data + "--> ON"); @@ -45,7 +45,7 @@ io.on('connection', function (socket) { gpio.close(data); // Close pin }); }); - io.sockets.emit('listPinsON',{listPinsON}); + io.sockets.emit('listPinsON',listPinsON); }else{ //pin already encès io.sockets.emit("alreadyON", data); @@ -68,7 +68,7 @@ io.on('connection', function (socket) { gpio.close(data); // Close pin }); }); - io.sockets.emit('listPinsON',{listPinsON}); //aqí envia la data + io.sockets.emit('listPinsON',listPinsON); //aqí envia la data });