|
|
|
|
|
by kator
3861 days ago
|
|
I built one of these a couple of months ago using a rPI and a simple relay to control the 12v feed to one of these: http://www.super-feeder.com/csfmodel.html
Literally the code to feed them is a crontab: 0 5,11,17 * * * /home/pi/bin/feed - > /dev/null 2>&1
Using this script in /home/pi/bin/feed: #!/bin/bash
export PATH=$HOME/bin:$PATH
(
source gpio
echo "Using pin 12"
gpio mode 12 out
gpio mode 12 out
gpio write 12 0
sleep 1
echo "Turn On"
gpio write 12 1
sleep 20
echo "Turn Off"
gpio write 12 0
) 2>&1 | logger -p local0.info -s -t feed
gpio write 12 0
exit 0
/home/pi/bin/gpio is from here: https://github.com/lasandell/RaspberryPi.git
I re-wrote it this weekend as a Openresty powered API (nginx+luajit) and put a web page on with a feed from the picam so my wife could look at the bowl and hit a button to dispense more if the cats needed it. |
|