Arduino Web Interface

Oh, I was just going on the below assuming you were wanting real time data and control instead of info from a data base.

Something where I could pull it up in a browser and see what voltages are on the analog pins and turn the digital pins on / off etc.

yea i need real time data and control. But by definition real time just means in a specified time frame. So for me, brewing, a one minute update on temps and control would be the max i would want to go, but a 30 second poll loop would be 'real time enough' for me probably. Faster would be better, but if the log and control is delayed by 15 to 30 seconds I would survive.

For instance, real time to a jet pilot is completely different than real time to a kid with a remote controlled car.

So yea i need real time data and control, but the get/post delay to get to an outside database would be acceptable. Hopefully I can get it to update / poll somewhere between 1 and 5 seconds.

Something that could do this (log and control from a database) would be fantastic for so many projects. Basically you could code an arduino once, then copy it over and over again, and just have it attach itself to certain tables in a database. Basically you could code it once and use it over and over again for other projects.

For instance my brewing project, and my zoned HVAC projects, same code on the chips, but have them attach to different tables. Then with the web interface do the data manipulation to visualize the setup according to the project, but the control would be super similar. Turn the fan on by inserting a 1 into the proper place in the database. Would save me oodles of time and I could use it for multiple things.

I suppose your method would work, but it sounds like it would create constant network churn needlessly updating a data base (somewhat like a constant ftp feed) where an on demand setup wouldn't. I've got a simple pan/tilt cam below (connected to a pc) that is basically a web based on demand setup that only operates when needed. If I were needing info from an arduino, I'd go for an on demand setup that should only have a 1-2 sec delay at most.

http://web.comporium.net/~shb/wc2000-PT-script.htm

well i need to update the data pretty constantly anyway, so if every 2 seconds I logged the data, might as well use that same sql connection to run a select, then use those results as triggers for control.

It would be constant network churn, but I could take out all of the intentional delays and just do it as fast as the network would let me. That would get me a pretty quick system, and wouldn't be any more bandwidth than me streaming a movie over youtube.

Don't worry about it, I've had data streaming from a Wifi Arduino and updating a remotely hosted mySql dB every 1 second!

To the server its just another process and mySql's can handle up to 2000 processes simultaneously - I was using a hostgator reseller server with Linux, nothing special at all, and the extra load didn't affect what I pay every month. Same with my broadband account, I usually end up with 10 gigs spare every month anyway so using another gig was no big deal.

The benefit was, I and lots of people from here, were able to view data updating in real time from all parts of the world.

Just how sweet can a lemon be? :wink:

John-Ryan, have you tried controlling it at all from the web?

John-Ryan, have you tried controlling it at all from the web?

Of course, that's why I bought the shield in the first place.

I had an example running here for months before I pulled the plug. If you can master xhtml/css/ajax/php and mySql then you can add buttons and fields to your web interface for sending data to Arduino from a remotely hosted website, and you can add a range of Flash dials and gauges to display data sent from Arduino via WiFi to a mySql.

In a year I'm sure feats like that will be commonplace, but right now I personally have no need for an application that I can control from a web based UI. I could use it to remotely turn house lights on and off, or with a PIR, send web based sms txt messages to myself if a break-in happens, but I don't need any of that because we already have a security system.

Right now we're working on UDP protocols for a mesh network which will allow us to extend the range of a network by increments of approximately 100 meters, that being the distance between each node. Once that's finished, I will be building a web based UI for monitoring and controlling the network, and I plan to use it for monitoring water levels, temperature and humidity, and seismic activity at various points of hillside. Some scientists currently visit their data collection nodes individually and use SD cards for storing sensor readings. Using WiFi and UDP means we can run a line of solar powered sensors and collect data at the end point which is then transferred in real time to a mySql on a remote server. So we'll be taking the leg-work out of data collection.. and at a cost that doesn't need a scientific-foundation-sized budget = )

If you can master xhtml/css/ajax/php and mySql then you can add buttons and fields to your web interface for sending data to Arduino from a remotely hosted website, and you can add a range of Flash dials and gauges to display data sent from Arduino via WiFi to a mySql.

Wow, where did all that come from??? You don't need xhtml/css/ajax/php and mySql to make a simple web interface to control and get data from gizmos using a brouser interface. If you had to do all that for your project, then Jack Handey sums it up below:

"There is nothing sadder than a mosquito sucking on a mummy. Give it up little guy." Deep Thoughts by Jack Handey :wink:

zoomkat

Wow, where did all that come from??? You don't need xhtml/css/ajax/php and mySql to make a simple web interface to control and get data from gizmos using a brouser interface. If you had to do all that for your project, then Jack Handey sums it up below:

"There is nothing sadder than a mosquito sucking on a mummy. Give it up little guy." Deep Thoughts by Jack Handey

Wow.. where do you "think" it comes from genius!!!

It comes from years of experience, whereas your attempt to slag my post proves you have none.

You can use anchors to make a minimalist interface but you still need xhtml, or html, and you definitely need php and mysql. But, we're talking about GUI's, as in "graphical user interface" GUI, not a "simple web interface". And we're not talking about running the interface directly from the controller, the GUI is run from a remote server - so that the overhead of a nice looking GUI isn't lumbered onto the controller.

So next time you throw around disparaging comments, make sure you read the entire post first.

"There is nothing dumber that an idiot." Deep Thoughts by John Ryan :wink: :wink:

"There is nothing dumber that an idiot." Deep Thoughts by John Ryan

Don't strain yourself now. Looks like you're trying to pimp yourself as a programer and a network Know-it-all. One does not need all the hot air and BS you blew with your "solution". You need to include it at the below site. :wink:

Don't strain yourself now. Looks like you're trying to pimp yourself as a programer and a network Know-it-all. One does not need all the hot air and BS you blew with your "solution". You need to include it at the below site.

Get a life toss jockey, and by the way "Mr Know F.A", "brouser" is spelled "BROWSER"!

You can't even spell that which you suppose to know about, and that makes you full of crap!

Unless you have something constructive to contribute, go blow hard somewhere else!

Better still, try and create these web based slide potentiometers without xhtml, css, ajax, php and mysql - loser!

http://www.modxhost.com/slider/index.html

C'mon hero, where's your solution??? Either put up or shove off!

Actually, boys...
You are both trying to help soldstatic.
Thats very good.
Cut the rest.

Woohoo!!, that is just a javascript slider page, plenty of info at pages like below on the net. And actually it is just text that can be sent from a web enabled arduino, and is handled in a browser without any of the knowledge skills you have touted. I tinkered with them some time back (bottom). I'm just trying to help the origional poster and others get a simple web based control and data page, and you keep telling them they don't have the ability to make one. I think you just made the mistake in your first post of letting your BS grinder overheat pimping your "skills". ::slight_smile:

Better still, try and create these web based slide potentiometers without xhtml, css, ajax, php and mysql - loser!

http://www.modxhost.com/slider/index.html

C'mon hero, where's your solution??? Either put up or shove off!

Well, I like a challange! I've gone back and worked on my ssc-32 slider control from some time back and now have it controlling eight servos connected to my ssc-32 using a browser (IE) interface. Now I challange you to do something similar with your three sliders you posted in your link. After an appropriate amount of time for you to develop your slider setup, we can post our slider setups here in the forum for others to use in their projects if desired. Guess it is time for you to walk your talk. :wink:

Well, looks like John "catfish" Ryan is going to be a no show with his sliders. Here is the simple setup I've made for using "web" sliders with my ssc-32 servo controller. Web sliders aren't "real time" like application based sliders where you move the slider up and down and the servo moves. With these Web based sliders one moves the slider and then sets that position, which sends the position to the servo pc. This setup requires the apache web server to be running on the pc connected to the ssc-32. The slider.bat file is put in the apache cgi-bin folder. This batch file receives the GET query_string, parces out the needed info, and sends it out the com port. The "mode" line is generally not needed if the comport to be used is already set at the desired baude rate. I've put the slider demo page at the below link. Open the link and then view the source to see the workings. This page is made for testing on a pc, so it access the apache server on the pc using 127.0.0.1 instead of an external IP address/URL. The other links are to the slider source site where they can be downloaded and info viewed. Not sure on the specifics of the arduino controlling servos, but if it uses values of 0-180, then the sliders and the slider.bat file could be adjusted to fit. No real rocket science here, so most anybody should be able to make a slider setup if needed.

http://web.comporium.net/~shb/eight2.htm

slider.bat with the "mode" commented out

@echo off 
echo status: 204 
echo. 
echo. 
::mode com8:9600,N,8,1 >nul 

SET sv=%query_string:~11,1%
SET ps=%query_string:~13,4%
SET xx=#%sv%p%ps%
echo %xx% >com8

Somehow I stopped getting notified of replies to my own post lol

the flame war = lame, since you both called each other stupid and had spelling/grammatical mistakes lol

Anyway i do appreciate the advice!

So I've done a lot of thinking and planning etc, and I think I have a game plan now. The goal is to essentially have a database interface to the arduino. So I'm going to use an EThERNET shield for now and get it set up to connect to a sql server. It'll post the raw data from the analog inputs to tables in the server, same with the DI pins, and then it will select from the database for values to put on AO/DO pins. The goal will be to keep it as simple as possble.

After that's complete, the next move will be to create a web display of the status of the board using php/sql. Then I can start to add buttons / input etc to control the board.

The next step will be to allow the board to use UPnP so that it is network discoverable. Connecting to it will essentially redirect the user to the web interface. That way don't need to know the IP address.

Then the last and final step will be to cut the cord, even if by cutting the cord i mean adding more cord and crap. I'm going to get a couple of those linksys routers that can be flashed with WWDRT or whatever it is, that makes the router very configurable beyond what it usually can do. Then I will configure the router to allow adhoc connections and act as a bridge to my other wireless network, but also allow connections from my laptop / other devices regardless of wether or not it is connected to the bridged network (this way I can use it outside the home or in the home whatever). Since the arduino will pretty much be plug and go into the eth shield, boom. Plug that into the router and let it bridge to the home network and it's got wireless update and control to / from the database.

I know that router bit sounds like some overkill, but the router costs the same or less than a wifi shield, plus off loads the burden of connecting other clients etc and all that processing. All the arduino has to do is connect to the database and insert / select. Plus then I can use arduino over ethernet OR 802.11.

I'd really like to see your code from this project, do you have it anywhere? http://majestic81.plus.com/

Also does anyone have any code demonstrating the sql capabilities?

If you have a Ethernet shield and want to connect to the board from any computer or even a mobile phone is it easy to get data from and put data in to the Arduino ? I've read this thread with interest but failed to reach a conclusion.
For example if you have gates at the end of your drive way. Someone presses a button on the gate (door bell) and this button press gets stored o the Arduino and can then be viewed on any device with network access then you want to send a command (again from any browser on any device on the network) and the Arduino board controls the gate open/close sequence. For something as simple as this can it be done via any device on any web browser? Or do you have to go up the dedicated device SQL server route? The example http://majestic81.plus.com/ is ideal for getting the bell push data from the Arduino but how could a soft button be added to then open the gate?

well i'm going the database route, which you could use as well. A dedicated sql server is not a big deal, and you could always build a virtual machine on your local network to play that role. The problem you'd face with the gate concept is that you'd have to have wifi range out there at the gate.

You could easily do the server idea for what you're doing. just look at the server example for the arduino. You wouldn't need a sql server of any type, but you would need to know the ip addy of the arduino's connection (no big deal if you use a static ip address)

Something simple like your project wouldn't need the database functionality. I want extra extensibility from the database, including lots of statistics tracking etc that will help me refine my brewing process.

Thanks for the reply. I would probably go for wired ethernet though I know that doesn't make any difference to the database. I would want the simplest method possible to be able to log in and see the status of some switch then send a signal over the net to then make it (the Arduion board) do somthing.