Sinai Martinez
Published

Lane Tech HS - PCL - Photon Powered Cat Feeder

Cat feeder powered by a Particle Photon allows you to feed your cat from anywhere in the world using the Blynk app.

IntermediateFull instructions provided2 hours181
Lane Tech HS - PCL - Photon Powered Cat Feeder

Things used in this project

Hardware components

Photon
Particle Photon
×1
Pringles can
×1
Generic Can
×1
Servo (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×1
Zip Tie
×1
LED (generic)
LED (generic)
×1
Buzzer
Buzzer
×1

Story

Read more

Custom parts and enclosures

img_20180313_113810_HhpoopNHln.jpg

Img 20180313 113810 hhpoopnhln

Schematics

Untitled file

File missing, please reupload.

Code

Untitled file

C/C++
#include <blynk.h>
Servo myServo;
int servo = D1;
char auth[] = "f0dad839118c4b669c7ee939d1c5136d";
const int buzzer = D2;
int led = D3;
void setup()
{
 myServo.attach(D1);
 Serial.begin(9600);
 delay(5000); // Allow board to settle
 pinMode(buzzer, OUTPUT); // Set buzzer - pin 9 as an output
 pinMode(led, OUTPUT);
 Blynk.begin(auth);
}
// Attach a Button widget (mode: Push) to the Virtual pin 1
BLYNK_WRITE(V1) {
 if (param.asInt() == 1) { // On button down...
   digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(1000);                       // wait for a second
   digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
   tone(buzzer, 3000); // Send 1KHz sound signal...
   delay(1000);        // ...for 1 sec
   noTone(buzzer);     // Stop sound...
   digitalWrite(led, HIGH);   // turn the LED on (HIGH is the voltage level)
   delay(1000);                       // wait for a second
   digitalWrite(led, LOW);    // turn the LED off by making the voltage LOW
   for (int i = 0; i < 4; i++)
   {
     for (int i = 0; i < 180; i++)
     {
       delay(10);
       myServo.write(i);
     }
   }
   myServo.write(0);
   Blynk.notify("THE BEAST HAS BEEN FED");
 }
}
void loop()
{
 Blynk.run();
}

Credits

Sinai Martinez

Sinai Martinez

1 project • 5 followers
Contact

Comments

Add projectSign up / Login