Step 18: Firmware

This firmware will read incoming twitter data so that if you tweet "feed me!" from the username omnomnom the arduino will light up the two LEDs attached to pins 2 and 3 for 1 second, causing the food delivery sequence to start.

I am using Arduino 1.0 for this project, I recommend downloading this version (or later) for this project.  If you do not want to use the new version, make sure you have the following Arduino libraries (they are bundled with v1.0):
- Ethernet (for the Ethernet Shield)
- EthernetDHCP (for self-configuring the IP address is you use DHCP at home)

Turn on the power switch on the bottom of the feeder, the LCD should flash 12:00 and the motors should run through the food delivery sequence once.  Refer to the manual if you would like to set the clock or set additional food timers, this won't be necessary for the project.  Press the rec button and record a personalized message for your pet, this will play at the end of each food delivery sequence.

Here is the Firmware:

You will need to make a two edits before this firmware is ready to use.

1.  Insert your IP address in the following line at the top of the firmware:
IPAddress ip(190,298,34,132); //<< ENTER YOUR IP ADDRESS HERE!!!
if you don't know your IP address open File>>Examples>>Ethernet>>DhcpAddressPrinter, upload this code to your arduino with the ethernet shield plugged in (and ethernet cable connected), and open the serial monitor Tools>>SerialMonitor

2. Change the username of your twitter account in the following line (from the function connectToServer():
client.println("GET /1/statuses/user_timeline.xml?screen_name=nomnomnomfeeder&count=1 HTTP/1.1");

Upload firmware on your arduino board, plug in the ethernet modem/router.  Tweet "feed me!" from your twitter account and you should see your pet feeder dispense food in a minute or less.  The feeder will not receive any further tweets for four hours (to prevent over feeding), during this time, tweet another message to replace "feed me!" as your most recent message.
<p>. I featured this Instructable in one of my collections:<a href="http://www.instructables.com/id/8-Twittering-Thingamajigs/" style="">http://www.instructables.com/id/8-Twittering-Thingamajigs/</a></p>
not trying to be rude but can't you just set the automatic feeder to idk automatically feed your dogs... but fun looking project
<p>Hi Amanda,</p><p>Could I ask you some questions in private?</p>
Hi Amanda, great project! I thought I would do this for my senior project at school. Instead of using photoresistors and leds, using a simple transistor with a 2.2K resistor on the base, connecting the emitter to the ground side of the button pad and the collector to the positive side of the button pad would be a more cost-effective and time sparing solution. Also, I would put in piece of code that would post a tweet after the feeding procedure was completed to prevent overfeeding. But thank you, great idea, and this instructable will certainly come in handy.
That's what I was thinking, why not some transistor, maybe because of the power flowing through it to control the pet feeder.
I have gotten to the step where you attached the Ground from the D Battery on the feeder to the PCB board. I must have put it on the wrong area as one of the LEDs is constantly lit. Do you have an exact spot to put it? <br> <br>Also, do you have a part number for the Test Buttons? I can't find them. Great project though!!! I am almost done with mine.
Is the USB cable just for the initial program load? You can disconnect it after that, right? <br>
Definitely a cool project, but 1 question, why use photo resistors and LEDs in stead of just straight transistors or some form of switching circuit? Seems like a bit of a roundabout solution
I would love to see more of an explanation of how the arduino code works. Great project!
This is a nifty bit of work......however......I would NEVER be too busy to get home to your dog! I love English Bull Terrriers. Sadly ours died last year but we are now ready to invite another Bully into our home. <br> <br>If it isn't an English Bull Terrier......it's just a dog! <br> <br>Apologies to owners of other breeds, I'm sure you feel just as passionate about yours.
Great project! But what prevents the dog from shredding it into pieces? :P
just dont loose your phone or your dog might famish:-)
This is too cool! I am really bad with electronics but I will have to learn the basics so I will be able to make this soon.
that is one awesome project! My dog Buckley would love this.
i have been wanting to do something like this

About This Instructable


217 favorites


Bio: I'm a grad student at the Center for Bits and Atoms at MIT Media Lab. Before that I worked at Instructables, writing code for ... More »
More by amandaghassaei: OTCA Metapixel - Conway's Game of Life "9 Degrees of Freedom" IMU Twitter Controlled Pet Feeder
Add instructable to: