servo test

parent 77d7c6c7
Showing with 2 additions and 5 deletions
......@@ -54,11 +54,6 @@ function cerrarPuerta(){
}, 100);
}
abrirPuerta();
console.log("Fin 1");
cerrarPuerta();
console.log("Fin 2");
// Clean LEDs
//RED.pwmWrite(dutyCycle);
//GREEN.pwmWrite(dutyCycle);
......@@ -95,9 +90,11 @@ io.sockets.on('connection', function (socket) { // WebSocket Connection
if (estadoPuerta == 0 && ordenRecibida == 0) console.log("La puerta ya se encuentra cerrada");
if (estadoPuerta == 0 && ordenRecibida == 1) {
abrirPuerta();
console.log("Abriendo puerta");
}
if (estadoPuerta == 1 && ordenRecibida == 0) {
cerrarPuerta();
console.log("Cerrando puerta");
}
if (estadoPuerta == 1 && ordenRecibida == 1) console.log("La puerta ya se encuentra abierta");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment