Arduino dog treat dispenser

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
pdrizzle01
 
Posts: 2
Joined: Sun Aug 19, 2012 10:03 pm

Arduino dog treat dispenser

Post by pdrizzle01 »

First Post!!! Anyway I am new to arduino, but I know most of the basics. However, I have embarked on a project that I'm struggling with. I want to build a dog treat dispenser for use in a dog kennel. The idea is that the dog owners can log onto a website and press a button to give their dog a treat over the internet and see it through the use of a webcam. So I have concluded that I need an arduino with an Ethernet sheild. The problem I am facing is that I have virtually no idea on how to link the website with the arduino. Any information on how to bring this to life would be greatly appreciated.

p.s. I know that this probably ins't the right forum for this question but oh well. Does anyone happen to know what sort of programming language(s) I might need to make the website end of the project reality?

vcazan
 
Posts: 15
Joined: Tue Sep 15, 2009 8:57 pm

Re: Arduino dog treat dispenser

Post by vcazan »

All you need to do is run a web server connected to your homes router. Then using your ip address you will be able to view this web server anywhere in the world.

User avatar
stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: Arduino dog treat dispenser

Post by stinkbutt »

I have a couple of questions:

1. Who hosts your current website? If the answer isn't "I have the server at the kennel" then it's going to be a lot harder.
2. If you host your own web site, how are you currently handling webcams?
3. If you host your own web site, how is the web site handling business logic? Perl? Python? ASP? Java? Ruby?

Assuming you can actually dig into the back-end of your web site, this is how I'd do it:

Step one is to figure out how to put up a button on the web site that will (eventually) activate the treat dispenser. Step two is to code the back-end that will run a script each time that happens, sending a message to your ethernet-capable arduino instructing it to dispense a treat to the appropriate dog.

pdrizzle01
 
Posts: 2
Joined: Sun Aug 19, 2012 10:03 pm

Re: Arduino dog treat dispenser

Post by pdrizzle01 »

Well as of now its more of an advertisement site that is not run through a server at the kennel. Its hosted from an online hosting service. The webcams I can add in after the dispenser part, as I am more familiar with them than arduino, and if not I can figure that out later.
As far as the back end of the site is concerned,of those listed including php (if that would also work) which one of the those would be most compatible with the way arduinos are programmed (a version of c I think)? Also would I have to use a server actually located at the kennel or could I say connect the arduino to the back of the network router without the use of an on location server? Or do arduino's not function in that way?

User avatar
stinkbutt
 
Posts: 593
Joined: Wed Feb 17, 2010 2:40 am

Re: Arduino dog treat dispenser

Post by stinkbutt »

Well,

Like I said, it's doable, but much harder. If you have the web page hosted by someone else, you'll need to have THEM send a message over HTTP, TCP/IP, etc... to the IP address of your kennel. Does it even have internet access? Also you'll need to do scripting run from your web host. Are you perhaps on a cheap plan? 'Cuz they prolly don't do much more than serve up dumb HTML pages, perhaps at most with a mail account. So you'll need to get them to implement the scripting. I don't know what they use, but PHP doesn't really get you there. At least not on it's own.

Then you'll need to make sure you have a static IP for your kennel. Otherwise the web host wouldn't be able to locate it. Then you'll need to configure your router to forward certain requests to your Arduino, at which point you can configure the Arduino with a static IP (you'll need a static IP inside your company network for the same reasons.) Then you can FINALLY code the Arduino to do whatever hoodoo you need to dispense a treat.

Like I said. Doable, harder. MUCH harder.



By comparison, if you're hosting your own web site, you just run a script on the server (it's your server, so just go ahead and install whatever you're comfortable with - Perl's probably the most ubiquitous with the gentlest learning curve.) I like Java 'cuz I cut my teeth on Java back in aught-one. Your script would send a message to the Arduino to dispense the treat. You wanna use ethernet with the Arduino? Sure. But serial would also work. Or probably other ways, though I can't think of them right now.

Doable, and easier. MUCH easier.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”