Things used in this project

Hardware components:
Photon new
Particle Photon
×1
13711 01
SparkFun ESP8266 Thing - Dev Board
×1
Software apps and online services:
Q8wtlimqnp04fzhtr9v5
IFTTT Maker service
Particle build
Hand tools and fabrication machines:
Power Drill
Wire stripper
Exacto blad

Schematics

Wiring
Img 6772 sgooa00ejc

Code

CodeC/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

9c38bcc06b043ecde46236b79335429c
Sarena Berg
1 project • 0 followers
Contact
Thanks to Gabriel Roche.

Replications

Did you replicate this project? Share it!

I made one

Love this project? Think it could be improved? Tell us what you think!

Give feedback

Comments

Add projectSign up / Login