arduino to openwrt interface

G'day folks,

Thought I'd found what I needed, but after re-examining while trying to implement it; probably not such a good solution...

Basically what I'm doing - is using arduino to control a system; want to output some of the data from sensors and system status info to a webserver so I can check on it remotely.

Seemed the best way to do this, was to connect to a fonera 2100 running openwrt... Got the arduinos rx/tx pins connected to /dev/ttys0 on the fonera. That's working nicely - been playing with it all morning :slight_smile:

But the real question, is - what's the best way to take that arduino data and spit it out through that serial link - and make it available to apache in a useable format?

Thanks in advance,

Andy

Assuming you can write a cgi to be served on the fonera, I'd proably write a cgi script that querried the arduino (just sending a single character is good enough), let the arduino sketch serial.print() the values, then let the cgi read them and display HTML.

-j

Ok, that makes some sense to me... But anyone have an example code kicking around I could play with (it's been way too long since I last did any programming - and cgi didn't exist when I did) :slight_smile:

openwrt web pages are served by shell scripts
you should find lots of these to read/edit somewhere on the fonera’s flash…