Sarena Berg
Published

Dog/Cat Feeder

This machine will work so that if you send a text message, it will dispense your animals food without you having to get out of bed.

EasyShowcase (no instructions)10 hours259
Dog/Cat Feeder

Things used in this project

Hardware components

Photon
Particle Photon
×1
SparkFun ESP8266 Thing - Dev Board
SparkFun ESP8266 Thing - Dev Board
×1

Software apps and online services

Maker service
IFTTT Maker service
Particle build

Hand tools and fabrication machines

Power Drill
Wire stripper
Exacto blad

Story

Read more

Schematics

Wiring

Img 6772 sgooa00ejc

Code

Code

C/C++
  Servo myservo;
    
    int servoPin = A5; 
    int soundPin = D0;
    
    
    void setup()
    {
    
      myservo.attach(servoPin);  
      myservo.write(0);
      delay(1000);
      myservo.detach();
      
      Particle.function("feed",triggerFeed);
    }
    
    void loop(){
        
    }
    
    int triggerFeed(String command)
    {
    
    
      //adapted from "Alexa: The Dog Feeder" by Team reid (Malia Young Reid and Christopher Reid)
         if (command=="feed")
            {
            digitalWrite(soundPin, HIGH);
            delay(500);
           digitalWrite(soundPin, LOW);
            myservo.attach(servoPin);
            myservo.write(0);
            delay(2000);
            myservo.write(360);
            delay(2000);
             myservo.detach();
          Particle.publish("doggy_time", "time");
          return 1;
          } else {
              return -1;
              }
        
        }

Credits

Sarena Berg

Sarena Berg

1 project • 0 followers
Contact
Thanks to Gabriel Roche.

Comments

Add projectSign up / Login