Web interface
FORD
Posts: 221
Hi All,
As a bit of a newbie with web stuff, I was looking for suggestions for the simplest, cheapest and easiest to understand serial to ethernet web interfacing devices.
If anyone has any suggestions for some devices it would be very much appreciated,
Cheers,
Chris
As a bit of a newbie with web stuff, I was looking for suggestions for the simplest, cheapest and easiest to understand serial to ethernet web interfacing devices.
If anyone has any suggestions for some devices it would be very much appreciated,
Cheers,
Chris
Comments
So you need an extra configuration step to configure the wireless network (it starts with a default ad hoc setting).
You can use the serial to WiFi module in place of the serial cable, with a telnet client ( I tested it and it is very easy to use).
Otherwise you have a TCP/IP stack, so you should be able to process an html request simply parsing the strings with the serial port (I didn't test it yet, but by mistake a sent a web page request and the propeller received the data, so it looks promising).
Massimo
The Lantronix XPORT is another possibility but I haven't used it myself.
Cheers,
Will get moving with the Pink one I think,
cheers,
Chris
Those roving networks RN-XV modules sound VERY interesting as well... going to go look those up now!
Dave
Best,
Dave
Things are returning a bit to normal, so I'm going to send along some of teh code as I find it. One of the cooler things I did with the PINK was to be able to use a web-interface to set the clock chip I use (a DS1302). The web interface writes to the NB Vars, and then I have a subroutine which reads those vars and writes the values to the DS1302. Here is the subroutine to do this:
The beauty of the PINK is that it uses EVERYTHING that runs client-side on a user's browser, so HTML and CSS for really nice formatting, graphics (with somewhat of a limit due to space on the PINK), and JavaScript all do their usual thing, so function and look & feel can all be made really, really nice. Getting data from a web page form to the NB Vars is simplicity itself - basically just naming the form's inputs as the var number you want to stuff the data into.
But with the Time-Setting routine I made for the PINK/DS1302, I went one step further by using JavaScript to obtain the computer's time and set those variables to teh proper values in the PINK.
Here's the JavaScript I used for that:
Of course the form in my HTML code is named setForm:
[html]
<FORM ACTION="#" NAME="setForm" METHOD="post">
<INPUT TYPE="hidden" NAME="Nb_var33" MAXLENGTH=1> <!-- Data Change Flag -->
<INPUT TYPE="hidden" NAME="Nb_var34" MAXLENGTH=12> <!-- Space to be activated (99 if time set)-->
<INPUT TYPE="hidden" NAME="Nb_var61" MAXLENGTH=12> <!-- Start Year -->
<INPUT TYPE="hidden" NAME="Nb_var62" MAXLENGTH=12> <!-- Start Month -->
<INPUT TYPE="hidden" NAME="Nb_var63" MAXLENGTH=12> <!-- Start Date -->
<INPUT TYPE="hidden" NAME="Nb_var64" MAXLENGTH=12> <!-- Start Day -->
<INPUT TYPE="hidden" NAME="Nb_var65" MAXLENGTH=12> <!-- Start Hours -->
<INPUT TYPE="hidden" NAME="Nb_var66" MAXLENGTH=12> <!-- Start Minutes -->
<INPUT TYPE="hidden" NAME="Nb_var67" MAXLENGTH=12> <!-- Start Seconds -->
<INPUT TYPE="submit" NAME="submit" VALUE="Synchronize Clock" onClick="check(this.form)">
</FORM>
[/html]
And you'll note that I set var33 and 34 - those are the bits I designated to tell the Basic Stamp that there are new values available to be read. The stamp program continually checks for those bits to determine if it really needs to read anything, or just keep doing the other stuff I have it doing. Only if it sees a "1" on var33 does it take action on the values. This saves a lot of time and allows me to have the stamp doing a lot of other stuff.
So these should give you a lot of goodies to work with. What I've given you here covers just about every aspect of getting data into and out of a PINK, between a computer and a Stamp. They are immensely cool little items.
You'll have to carefully read the setup instructions on your PINK software for setting the IP address, etc. But once you have the firmware set up properly you should be able to start playing pretty quickly. Be sure to use a CROSSOVER cable if you're going directly from PC to PINK; use a regular cat5 cable if you're putting your PINK on your LAN.
Let me know if you have any questions... happy PINKing!
Dave
I also just discovered a plethora of my initial development files... let me know when you're done digesting the code above if you need more... :-)
Dave
Dave
And the kicker is that PropForth has gotten a rather complete tutorial to use it as well.
So rather than just use a device to hook up the LAN to a serial port, you actually can have other things happen - like web pages, or data recording. or whatever. It will likely be the next thing I will purchase from Parallax as the value is just too good to pass up.
Thanks Loopy!
Dave