movimiento puertas

Dependents:   Prueba_Ascensor NewAscensor

Committer:
Hedizxom
Date:
Wed Jun 06 20:11:48 2018 +0000
Revision:
2:253f5b9afee1
Parent:
0:ca870e07774d
servomotores puertas;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Hedizxom 0:ca870e07774d 1 #include "door.h"
Hedizxom 0:ca870e07774d 2 #include "mbed.h"
Hedizxom 0:ca870e07774d 3
Hedizxom 0:ca870e07774d 4 /*
Hedizxom 0:ca870e07774d 5 *door.cpp
Hedizxom 0:ca870e07774d 6 */
Hedizxom 0:ca870e07774d 7
Hedizxom 0:ca870e07774d 8 Door::Door(PinName pwm_signal): servo(pwm_signal) {
Hedizxom 0:ca870e07774d 9 servo.period_ms(30) ;
Hedizxom 0:ca870e07774d 10 servo.pulsewidth_us(CLOSE_DOOR);
Hedizxom 0:ca870e07774d 11 }
Hedizxom 0:ca870e07774d 12
Hedizxom 0:ca870e07774d 13 void Door::open() {
Hedizxom 0:ca870e07774d 14
Hedizxom 0:ca870e07774d 15 servo.pulsewidth_us(OPEN_DOOR);
Hedizxom 0:ca870e07774d 16 }
Hedizxom 0:ca870e07774d 17
Hedizxom 0:ca870e07774d 18 void Door::close(){
Hedizxom 0:ca870e07774d 19
Hedizxom 0:ca870e07774d 20 servo.pulsewidth_us(CLOSE_DOOR);
Hedizxom 0:ca870e07774d 21 }