mikesoniat
Published © GPL3+

Door Closing Robot for Zoom Meetings

Working from home can be full of noise and distractions. Now, when I join a Zoom meeting, this robot closes my office door!

IntermediateFull instructions provided4 hours1,495
Door Closing Robot for Zoom Meetings

Things used in this project

Hardware components

Photon 2
Particle Photon 2
×1
Adafruit DC Motor + Stepper FeatherWing Add-on For All Feather Boards
×1
DG01D-W/LEADS Gear Motor Pair with Leads and Breadboard Pins, 90 Degree Shaft
×1
Wheels - 65mm (Rubber Tire, Pair)
×1
4xAA battery holder
4xAA battery holder
×1

Software apps and online services

Adafruit-MotorShield-V2 library
Microsoft Visual Studio Code
Zapier
Zoom

Story

Read more

Schematics

Wiring Diagram

Code

Door Opening Robot

C/C++
Using a Particle Function to send "open" and "close" commands to the robot causing it to open and close my office door. The robot is running on a Photon 2.
/* 
 * Project Door Opening Robot
 * Author: Mike Soniat
 * Date: April 2024
 */

#include "Particle.h"
#include "application.h"
#include "Adafruit-MotorShield-V2.h"
#include "Adafruit_PWMServoDriver.h"

// Let Device OS manage the connection to the Particle Cloud
SYSTEM_MODE(AUTOMATIC);

// Run the application and system concurrently in separate threads
SYSTEM_THREAD(ENABLED);

// Show system, cloud connectivity, and application logs over USB
// View logs with CLI using 'particle serial monitor --follow'
SerialLogHandler logHandler(LOG_LEVEL_INFO);

// Create the motor shield object with the default I2C address
Adafruit_MotorShield AFMS = Adafruit_MotorShield(); 

// Create motor objects
Adafruit_DCMotor *leftMotor = AFMS.getMotor(1);
Adafruit_DCMotor *rightMotor = AFMS.getMotor(2);

//motor function
int moveMotor(String command)
{
  if (command == "close")
  {
    leftMotor->run(FORWARD);
    rightMotor->run(FORWARD);
    Particle.publish("close");
    delay(4000);
    
  }
  else if (command == "open")
  {
    leftMotor->run(BACKWARD);
    rightMotor->run(BACKWARD);
    Particle.publish("open");
    delay(2000);  
    
  }
  leftMotor->run(RELEASE);
  rightMotor->run(RELEASE);
  delay(1000);
  return atoi(command);
}

void setup() {
  Serial.begin(9600);   

  //init Particle functions
  Particle.function("MOVE", moveMotor);

  //init motor driver
  AFMS.begin();
  leftMotor->setSpeed(255);
  rightMotor->setSpeed(255);
  leftMotor->run(FORWARD);
  rightMotor->run(FORWARD);
  leftMotor->run(RELEASE);
  rightMotor->run(RELEASE);

}

void loop() {

}

Credits

mikesoniat

mikesoniat

6 projects • 11 followers
I've been an electronics hobbyist, hacker, maker for as long as I can remember. My current passions are robotics, AI, and machine learning.

Comments