Hacker News new | ask | show | jobs
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.
1 comments

I'm looking to build something similar. What did you use as a hopper?
The super feeder (linked in my original comment) is amazing, high quality, really strong, so far I'm very happy with it.
they linked to a feeder! they're pretty cool, really heavy duty.