Most of the people has a pet at their home, if not then they for sure knows someone who is. Pet owners sometimes stay out late maybe because they have work to do or an emergency to take care of. If that happened it would be nice to easily have a machine that takes care of the food part for the pet to make sure it stays healthy.

What it does

It is set to dispense food every certain interval of time pre set or through using a Web Page to override the machine to dispense food. It also was planned that the web page shows how many times the food was dispensed in the last 24 hours but because of the time limit, that might be an add on feature to add later on.

How we built it

We are one time. Built by: Moaz Abougabal, Deion Booher, Paul Jacobs, Curtis Mimes.

Challenges we ran into

You can't really not run into challenges. First, running the stepper motor for arduino on a raspberry pi. The wiring part was not in the right order and took a whole a lot of time to get it together. Sec, setting up a web page to send data to the raspberry python file.

Accomplishments that we're proud of

Making our idea work!

What we learned

Setting up hardware for raspberry pi and how the GPIO pins work.

What's next for Automatic Pet Feeder

Control it using an app on the phone and making it decent priced for everyone to be able to use.

Code Used: named

import RPi.GPIO as GPIO import time

GPIO.setmode(GPIO.BCM) GPIO.setwarnings(False) coil_A_1_pin = 4 coil_A_2_pin = 17 coil_B_1_pin = 23 coil_B_2_pin = 24

adjust if different

StepCount = 8 Seq = range(0, StepCount) Seq[0] = [0,1,0,0] Seq[1] = [0,1,0,1] Seq[2] = [0,0,0,1] Seq[3] = [1,0,0,1] Seq[4] = [1,0,0,0] Seq[5] = [1,0,1,0] Seq[6] = [0,0,1,0] Seq[7] = [0,1,1,0]

GPIO.setup(enable_pin, GPIO.OUT)

GPIO.setup(coil_A_1_pin, GPIO.OUT) GPIO.setup(coil_A_2_pin, GPIO.OUT) GPIO.setup(coil_B_1_pin, GPIO.OUT) GPIO.setup(coil_B_2_pin, GPIO.OUT)

def setStep(w1, w2, w3, w4): GPIO.output(coil_A_1_pin, w1) GPIO.output(coil_A_2_pin, w2) GPIO.output(coil_B_1_pin, w3) GPIO.output(coil_B_2_pin, w4)

def forward(delay, steps): for i in range(steps): for j in range(StepCount): setStep(Seq[j][0], Seq[j][1], Seq[j][2], Seq[j][3]) time.sleep(delay)

if name == 'main': while True: delay = 1 steps = raw_input("How many quarter rotations do you want the blades to rotate?") Dstime = raw_input("How long do you want the dispanse period to be? (in hours)?") daytime = 24+1 while daytime > 0: forward(int(delay) / 1000.0, int(steps)*125) time.sleep(3*int(Dstime)) daytime -= int(Dstime)

Share this project: