Have Arduino poll a real web server for commands?

G'day peeps,

I'm brand new to Arduino, but know enough about electronics to be dangerous and I write software for a living.

Like many people, I want to control circuits via the web. I've seen examples and posts about running a web server on an Arduino, but I want to use a different approach: have the Arduino regularly request commands from a real web server. This sidesteps security barriers (ISPs won't block ports, etc.) and it means I can use a web technology to make the client side work, instead of crude C++ code.

This doesn't seem like a hard thing to do, but I have a strong feeling I'm reinventing the wheel, despite my web searching for other people's ideas. Does anybody have any links to similar projects? Are there standard libraries for basing digital/analogue output control on text strings? Any basic protocols to recommend? (I've seen hari's nice, clean URL-based code, but it's not really applicable in this case.) Am I really being cutting edge here?!

My hardware, BTW, is an EtherTen from Freetronics, which is basically a Uno with an ethernet shield built in. I'm impressed with it so far.

Cheers, MikZ.

but I want to use a different approach: have the Arduino regularly request commands from a real web server.

Typically the client code sends a GET request to a server running some type of CGI application. The server starts the application and supplys the data contained in the query_string to the application for the application to use. Very common, but I don't have any client test code that acts upon some event to send the request. There are code examples posted for using with variuos types of servers.

Have you looked at https://pachube.com/ yet?

I can use a web technology to make the client side work, instead of crude C++ code.

Excuse me? You mean that you want to use capabilities that are based on C++, instead of learning C++ yourself?

zoomkat: Yep, that's exactly the kind of approach I was thinking of, and using PUTs to send any local status updates. Great minds and all that. 8)

James: Wow, Pachube looks really cool—I'll definitely consider using that. (I wonder if you know about Freebase, which I think is a similar idea for different kinds of data.)

PaulS: I've been coding in C++ on and off for 15 years. I've written machine control code in it before, and it's good for that, but using it to maintaining complex UI code in a 32kB environment would only fall slightly short of trying to code FaceBook in Assembler. (Hmmmm... I wonder if that's why FB is so buggy! ;) )

Thanks, peeps, even though it sounds like I will indeed have to invent this wheel. Where's a good place to share what I eventually come up with?

Cheers, MikZ.

Ooooh, wait! I think James was alluding to instructions for connecting Arduino to Pachube via an ethernet bridge—I'll definitely continue my explorations down that path. Thanks, mate!