Well since I received my rpi at Christmas I have been working on building a rpi cat feeder that I could use to feed my cat whist away or late home from work ( no cats were starved during this project).
I am after a bit of help and also some input on what other features I could add.
So far I have :
-hosted a web page on my pi using apache2
- a webcam feed of the feeder and food bowl
- modified a motion activated sweet dispenser which is now activated by a python script from my web page with a motor driver controlling the pre existing motor in the sweet dispenser for a set duration
- all feed times and feeders name are stored in a MySQL dB and visible on the web page in feed history
- feed count stored to allow me to set a daily feed limit
- option to take a webcam screenshot and email to an inputted email address
- crontab running every 12 hours that emails me my external ip address so if I'm away from home and my adsl router decides to reboot I'm never left not being able to connect
- I have just brought an adafruit pir motion sensor. At the moment I have it connected to an input gpio. I would like this to trigger the email script above to send me a pic when the cat is at the bowl.
The last point is where I need some help if possible and your thoughts.
The pir sensor is going to be mounted on the front to detect the cat. The hurdle I can see is that it's going to be activated when the cat is feed as the food comes out just below the pir.
I thought maybe use sw to overcome this . Maybe something like using the pir/ email pic script to check the last feed time from MySQL and if the email script is activated within x number of seconds of the last feed then it escapes the script.
This is going to be a challenge for me as I'm rubbish at deducting times with scripts and also my feed motor is driven by python , the pir input gpio is monitored by python and my email script is php
Any contributions to my project would be appreciated. I don't want this project to come to an end and need more ideas.
The code & gpio pin parts have been tested separately so now I need to hard wire the motor to gpio and the pir sensor to the sweet dispenser.
I have brought 2 pcb mounted rj45 sockets. Was hoping I could fix one inside the sweet machine and use an rj45 cable to connect pi to sweet machine and mount another to a cobbler .
I'm using gnd, +5 and a trigger for the motor and the same for the pir so need six cables from pi to sweet machine. Not sure how good catv cable will take the 5v.
Any inputs appreciated. Thanks.