apertura y cierre con voz funcionando

parent c85858ff
Showing with 8 additions and 4 deletions
......@@ -8,15 +8,19 @@ var Gpio = require('pigpio').Gpio;
GPIO
*/
// Inicializacion de pines
// Puerta cerrada: 1850
// Puerta abierta: 950
// Rango apertura: 900
// Inicializacion
var RED = new Gpio(4, { mode: Gpio.OUTPUT });
var GREEN = new Gpio(17, { mode: Gpio.OUTPUT });
var BLUE = new Gpio(27, { mode: Gpio.OUTPUT });
var motor = new Gpio(13, { mode: Gpio.OUTPUT });
// Puerta cerrada:1850
// Puerta abierta: 950
// Rango apertura: 900
var pulseWidth = 1850;
motor.servoWrite(pulseWidth);
// Abrir puerta
function abrirPuerta(){
......
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