Arthur Guy
Published © CC BY-NC-SA

Door Closer!

Fed up of getting up to close the door? Want to be able to close the door by talking to the room? If you answered yes then read on!

IntermediateShowcase (no instructions)7,047
Door Closer!

Things used in this project

Hardware components

Photon
Particle Photon
×1
Servo (generic)
×1
Magnet
×1

Software apps and online services

Alexa Skills Kit
Amazon Alexa Alexa Skills Kit

Hand tools and fabrication machines

3D Printer (generic)
3D Printer (generic)

Story

Read more

Custom parts and enclosures

Enclosure to hold the servo and Particle Photon

Code

Particle code

Arduino
This code runs on the particle photon and is uploaded through their IDE
SYSTEM_MODE(AUTOMATIC);

Servo doorServo;

LEDStatus blinkRed(RGB_COLOR_RED, LED_PATTERN_BLINK);

int closeDoor(String command);

void setup() {
    doorServo.attach(D0);
    
    Particle.function("closeDoor", closeDoor);
}

void loop() {

}

int closeDoor(String command) {
    
    blinkRed.setActive(true);
    
    int pos = 0;
    for(pos = 0; pos < 100; pos += 1)
    {
        doorServo.write(pos);
        delay(15);
    }
    
    for(pos = 100; pos > 0; pos -= 1)
    {
        doorServo.write(pos);
        delay(15);
    }
  
    blinkRed.setActive(false);
    
    return 1; 
}

Credits

Arthur Guy

Arthur Guy

1 project • 1 follower
Contact

Comments

Add projectSign up / Login