picaxe to net with wifi-to-serial module HLK-RM04

lbenson

Senior Member
I have gotten a wifi-to-serial module, the HLK-RM04, to work with a picaxe. The device is available from DX.com for $16.30US ( http://dx.com/p/hi-link-hlk-rm04-serial-port-ethernet-wi-fi-adapter-module-blue-black-214540 ). It's also available on Aliexpress, as is a test board for $7.80US ( http://www.aliexpress.com/item/Free-shipping-Serial-wifi-module-HLK-RM04-test-board/1129436621.html ). I didn't use the test board.

The device has 28 pins with a 2mm pitch, so it's not breadboard friendly. The data sheet is here: http://www.hlktech.com/uploadfile/2013042218402981701.pdf

The user manual is here: http://www.hlktech.net/inc/lib/download/download.php?DId=19

Only 4 of the 28 pins are needed--5V, 0V, Rx, and Tx (pins 1, 2, 20, and 21). The module takes 5 volts, but the I/Os need 3.3 volts, so I took advantage of another pin, pin 4 (which provides up to 300mA at 3.3V) to power the picaxe at 3.3V. I used a 3-pin row of turned header pins to link pins 1, 2, and 4 to the breadboard, bending pin 3 up out of the way and bending the other pins to fit the .1-inch breadboard pitch. Similarly, I used a 2-pin header to connect TX and RX to the breadboard, bending pins 20 and 21 as needed.

Configuration is done wirelessly, by connecting your PC wifi to the module's AP and taking your browser to http://192.168.16.254/ser2net.asp.

I changed the configuration as shown in the image below. I set the device to an ip on my network, 192.168.1.106, and set it up as a wifi client with a connection to an unencrypted test router (Omnibus9). Once you do this and hit <Apply>, you will lose your connection and have to reconnect using the ip you provided. I set the bit rate at 4800,8,n,1, and the Network Mode as "Server". I didn't know what "Remote Server Domain/IP" was supposed to do, so I changed it to a non-existant device in my network range.

Note that if you mangle the wifi connection and can't access the board, the manual shows how to ground a pin to reset to the factory configuration.

I used the following code on a 14M2:
Code:
'14wifi48.BAS blinks an led; test for programming success
#picaxe 14M2 
#no_data

symbol LED=b.0
start:
  pause 1000
  readtemp b.1,b13
  sertxd ("14wifi48 ",#b13,13,10)

main:
  high LED
  pause 350
  low LED
  pause 350
  high LED
  pause 125
  low LED
  pause 125
  high LED
  pause 1000
  low LED
  pause 350
  serout b.5, t4800_4,("serout pin 5 ", #w6,cr,lf)
  serin [3000, skip], b.4, t4800_4, b10,b11 ' 
  serout b.5, t4800_4,("received: ", b10, b11,cr,lf)
  sertxd ("received: ", b10, b11,cr,lf)
skip:
  inc w6
  sertxd (#w6," ")
  goto main
This blinks an led, and writes to pin b.5 about once every 6 seconds. Serin on pin b.4 times out after 3 seconds if nothing is received.

I connected to the device from a PC using putty, with designated IP and port, with a setting type of "raw". I could see the message from the picaxe every 6 seconds, and when I typed a two-digit number and hit <enter>, I got a message back of, for instance, "received: 23". This worked even if I waited through several incoming messages before hitting <enter>. It is probably possible for the incoming timing to be such that the picaxe would miss a character, but a message from the picaxe could be used as a "Clear-to-Send" signal, and a response within 3 seconds should be received reliably.

The module has a connector for attaching an antenna, but I just used the onboard antenna. I had no problem connecting to my router about 20 feet away.

So it looks like a nice device, though with complications in wiring it up. A similar but easier-to-use and less expensive device (quantity 10) appears to be the TLG10UA03. I've ordered several, and will write about them when I receive and have tested them.
 

Attachments

Last edited:

rossko57

Senior Member
I didn't know what "Remote Server Domain/IP" was supposed to do,
I believe you could use these modules as a pair, linking serial port to serial port over the ethernet/wifi infrastructure independently of any other device eg router. Effectively making a "long serial cable".
One may be a client and one a server - or maybe both servers - but needing to know their paired partner's IP address.

This usage might well be useful for some Picaxe projects, be interesting to see if you can make pairs when more than one is available.
 

g6ejd

Senior Member
Set it as a server and then try to connect to it from a web browser on a network connected PC. If it has a default page even a minimal one, you will see it. Ideally you could send data (from the serial port) to a web page.
 

lbenson

Senior Member
Going, in a browser, to the ip address of the device, gives you the configuration page with no clear way to get anywhere else (other than 3 other configuration pages). Going to ip/index.html results in "page not found".

It's easy to send characters to the picaxe with either a Linux device or Windows. From the command line, enter: echo 70 | nc 192.168.1.106 8080

I get back "received: 70" on either device--including both at the same time. <ctrl+c> breaks out of nc in either case.
 

g6ejd

Senior Member
So if there is no way of setting a server page there is no way to send data other than to an existing client connection as you've been doing. It does look like you can send and receive data to the PICAXE though through a PC based page. I wonder what happens if you set up a client page on port 8080 and set it to do a GET, whether you will receive the data on the browser page?

You can create a simple web page, with a GET command from the keyboard, then use a PUT command to 192.168.1.106:8080 and that will send the data OK.

You could also setup using UDP to PUT/GET.

There is little data on the device, but somehow I think it will do it if we can find a more detailed description of what it's doing.
 

lbenson

Senior Member
g6ejd--there are many options for the device, including controlling it using "AT" commands via serial from the picaxe. I've only found one useful instance which is documented: http://www.justblair.co.uk/connect-to-your-reprap-wirelessly-or-via-the-internet-using-the-hlk-rm04.html

This person uses it with the test board to send commands to his 3D printer--only one way as far as I can tell.

I'm used to getting picaxe sensor readings via a small Linux device, like the WR703N or HAME A1 or Seagate Dockstar (older), which sends the readings to a Linux concentrator using nc, so I'm content to follow that process here. I'm afraid I don't understand how people use PUT and GET with html to get data from serial devices (tho I've used cgi html to send serial to a picaxe based on clicking radio buttons on a web page).

If I can understand what you're suggesting, I'll try it. Maybe it's no more than substituting a PUT to 192.168.1.106:8080 for my 'echo "$tmp" > /dev/ttyUSB0' in the following bash script cgi code, set-heater.sh (which sends a two-character command to a picaxe):
Code:
#!/bin/sh
#read QUERY_STRING
#echo $(QUERY_STRING) >> /var/log/set-cam-query_string.log
echo $QUERY_STRING >> /var/log/set-cam-query_string.log
tmp=$(echo "$QUERY_STRING"|awk -F'=' '{print $2}')
echo "$tmp" > /dev/ttyUSB0
echo "$tmp" >> /var/log/set-cam.log
echo "Content-type: text/html"
echo ""
cat /www/heater.html
If this is what you're suggesting, can you provide help with the PUT syntax?
 
Last edited:

g6ejd

Senior Member
<html>
<body>
<form action="form_handler.php" method="GET">
User Name: <input name="user" type="text" />
<input type="submit" />
</form>
</body>
</html>

or
PRINT("GET /pub/data/observations/metar/stations/EGDM.TXT HTTP/1.0"); //download text
PRINT("GET /pub/data/observations/metar/stations/EGDL.TXT HTTP/1.0"); //download text
PRINT("Host: weather.noaa.gov");
PRINT(); //end of get request
 

lbenson

Senior Member
Thanks for the response, g6ejd, but I'm afraid I don't understand. Where would these pieces of code reside? How would they get data from a picaxe tied to an HLK-RM04, or put data to it?

At this point, using html code and a bash cgi script, I can send serial text to the picaxe from any Linux or PC device using "nc" (by modifying, for instance, 'echo "14" > /dev/ttyUSB0' to 'echo "14" | nc 192.168.1.106 8080" in code which now works on a Linux device wired to a picaxe through a usb/serial dongle).

The problem that I have, is that I don't see how to restrict that link to a +single+ other device--anything can write to and read from that link. I thought setting the HLK-RM04 as a client and specifying a server address would accomplish it, but when I try writing from that server, I get "connection refused".

I know that at this point it is idle speculation to ramble on about this device here, since there are apparently no other users, but I've found very little about the actual use of this device elsewhere.
 

hippy

Ex-Staff (retired)
My understanding is the HLK-RM04 is a dedicated TCP to Serial interface plus a configuration web server. Anything sent to the TCP to Serial port ( 8080 by default ) simply gets passed on to the serial. Hence echo "hello" | nc 192.168.1.106 8080 will simply result in hello coming out as five characters on the serial line.

It would be possible to send more meaningful commands than hello, such as readtemperature and the PICAXE, when it recognised that sequence, could send a numerical response back via serial.

As far as I can tell there is no in-built web server on the HLK-RM04 which allows web pages to be accessed which interact with the serial. If one sent a HTTP GET or POST to port 8080 the full sequence of characters making up that request would/should be passed through serial and a PICAXE could potentially handle those requests, allowing the PICAXE to act as a HTTP server, but one would have to write the code for the PICAXE to do that.

The alternative solution ( as done so far by lbenson ) is to use an intermediate PC which serves up web pages and uses CGI scripts to send data via serial ( using echo and nc here ) or retrieve data and insert that in returned web pages.

If one writes their own web servers on the PC one can effectively embed the CGI functionality within those servers so HTTP GET and POST requests to the PC web server can cause and allow interaction with the TCP-to-serial and set and retrieve data that way.

To answer the question as to how you can prevent anyone accessing the HLK-RM04; I am not sure you can other than setting it into client mode where it always connects to a particular IP address and that then probably won't play ball with 'nc' which is a client trying to connect to a server and the HLK-RM04 won't be running a server.

You really need to run a server on a PC which the HLK-RM04 can connect to and can also handle web page requests / putty interaction from the larger world and you almost certainly have to code that yourself.
 

lbenson

Senior Member
Thank you, Hippy, for your extended explanation.

And for the clues. "nc" can be a server. I can use the following command to connect from my server device (as set on the HLK-RM04 configuration web page) to the HLK-RM04 in client mode: nc -l -k -p 8080 192.168.1.106

(the "-l" option tells it to listen, which makes it a server, I guess.) Anything I type on the server is received by the picaxe, and I get back the confirmation. Connection attempts from other devices are rejected.

Now I need to figure out how to put this into a program on the server side. I suspect I can do this using redirection from named pipes, but I'll have to investigate to see how. (For anyone's information, my server is a Sheevaplug running Debian.)
 

Hemi345

Senior Member
This sounds similar to the Wiznet module I'm using for my home-grown PICAXE webserver. You would put http://192.168.1.106:8080 in your browser and it will return whatever is sent from the PICAXE back to the HLK-RM04. If properly formatted, the browser will display it as a webpage. There will be a bunch of header info sent along with the request from the browser to the HLK-RM04, so you'll need to use a qualifier to get past that if you intend to control something rather than just get general data back.

You can simply tack on information at the end of the URL like, http://192.168.1.106:8080/temp and even though the action is a GET, you can still tell the PICAXE to do something based on the URL. So in the above example, /temp could return the temperature, likewise /humidity could return the humidity. A variable name and value pair, like http://192.168.1.106:8080/?step=temp could be sent if need it for multiple commands... like if you want to get the outdoor temperature instead of indoor temp in Celsius, like http://192.168.1.106:8080/?temp=outdoor&scale=C

Otherwise, you could use the client-mode of the device to push information to a remote server... meaning any outgoing communication from the PICAXE to HLK-RM04 would be sent to the remote IP address you specified... useful for when you want the PICAXE to automatically update a remote computer or website like with weather information and such. Again, with a website, you would need to use valid header structure sent out so the webserver would know what to do with the data that follows.

BTW, how long does it take from power on till the HLK-RM04 is usable? I'm wondering if one of these devices would be a viable solution for a battery operated/solar charged project I'm working on instead of a dumb serial link pair. Thanks.
 
Last edited:

lbenson

Senior Member
Hemi345--yes, I think what you say is correct. And yes, I suspect you could build a web page on the picaxe and push it back out in response to a query. More than I expect to need to do.

From power-on until I'm receiving data from the HLK-RM04 is 15-18 seconds. That's with an unsecured wifi connection--it could well be longer with a secured connection. I don't know what the current draw is but I'm sure it is much more than a dumb rf unit--perhaps an order of magnitude. If you turn it on when you need to transmit, and your transmissions are infrequent, that might not matter. When always on the main chip is hot to the touch--but you can continue touching it.

In either client mode or server mode the device is bi-directional.
 

Pongo

Senior Member
Very interesting. Simplest way to communicate between a PC program and the picaxe is probably to use a virtual serial port software like HW VSP. I've found that to work well with the hardwired equivalent RS232 Ethernet and picaxes.
 

lbenson

Senior Member
OK, so what does it take to make a picaxe act like a web server?

The first thing to do is to find out what text is actually sent when a browser request is made, for instance, to get a temperature, http://192.168.1.106:8106/temp (note that I set up a port (8106) other than the standard HTTP port 80, so that there is not a conflict with the RLK-RM04 configuration port).

I set a Linux device to be a tcp server with the command, "nc -l -k -p 80". This says that nc will listen for tcp input (-l), and will keep alive (-k) on port 80 (the HTTP port). I issued the command above (without the port) from a browser on a PC.

This is what showed up on the Linux device:
Code:
GET /temp HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
Accept-Language: en-US
User-Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/.0)
Accept-Encoding: gzip, deflate
Host: 192.168.1.70
DNT: 1
Connection: Keep-Alive
The only thing the picaxe needs is the "GET /temp" (assuming that different pages, other than "temp" might be returned).

This is a simple matter for a picaxe SERIN command. Suppose that any different commands will have different first characters; this command will distinguish them:

serin b.4, t4800_4, ("GET /"), b10

So the entire picaxe server code (leaving code for case "x" and others to be filled in as necessary) is as follows:
Code:
'14htmlServer.BAS serves HTML pages
#picaxe 14M2 
#no_data

symbol baudrate=t4800_4
'symbol baudrate=t1200_4

start:
  pause 2000
  sertxd ("14htmlServer ",#b13,13,10)
  serout b.5, t4800_4,("14htmlServer ",13,10)

main:
  do
    b10 = 0
'    serin [5000,skip], b.4, baudrate, ("GET /"), b10
    serin [5000,skip], b.4, baudrate, b20, b21, b22, b23, b24, b10
    sertxd (b20, b21, b22, b23, b24, b10," ")
    if b20 = "G" and b21 = "E" and b22 = "T" then
      sertxd ("GET ",b10,cr,lf)
      select b10
        case "t"
          readtemp c.2, b11
          b11 = 22
          gosub sendHeader
          serout b.5, baudrate,("Content-Length: 30",cr,lf,cr,lf)
          serout b.5, baudrate,("<html><body><p>Temperature: ",#b11)
          serout b.5, baudrate,("</p></body></html>",cr,lf,cr,lf)
        case "x"
          ' ...
          gosub sendHeader
          serout b.5, baudrate,("Content-Length: 41",cr,lf,cr,lf)
          serout b.5, baudrate,("<html><body>'x' was entered</body></html>",cr,lf,cr,lf)
        else
          gosub sendHeader
          serout b.5, baudrate,("Content-Length: 40",cr,lf,cr,lf)
          serout b.5, baudrate,("<html><body>Page Not Found</body></html>",cr,lf,cr,lf)
      endselect
    endif
    pause 2000
   skip:
     if b10 = 0 then
      serout b.5, baudrate,(#b12," ")
      sertxd (#b12," ")
     endif
     inc b12
  loop

sendHeader:
  serout b.5, baudrate,("HTTP/1.1 200 OK",cr,lf)
  serout b.5, baudrate,("Content-type: text/html",cr,lf)
  serout b.5, baudrate,("Connection: close",cr,lf)
  return
This is a "complete" (if limited) html server. It distinguishes between multiple valid pages (those begining with "t" or "x" in this case), and invalid requests, which return "Page Not Found". I tested this on Explorer, Opera, Chrome, Firefox, and Safari.

The tricky part is getting the "Content-Length" correct. You have to count characters--in advance for static code, or dynamically for code which may change. For instance, the "t" selection sends a 30-character content, but if the temperature were a single digit, instead of "22", that would need to be corrected to 29 characters.

So it doesn't take a lot to make a simple html server with the picaxe using the HLK-RM04 to send serial text to the picaxe using wireless tcp/ip. Note that the HLK-RM04 must be configured for "SERVER" mode for this to work.

One bizarre thing for me--I could not get serin to work with a qualifier of "GET /", so I read 6 characters and look for "GET" in the first three. When I print what I've read, it looks good to me, like "GET /t".

Thanks to this thread for some hints:
http://www.picaxeforum.co.uk/showthread.php?22755-Wiznet-WIZ110SR
 
Last edited:

lbenson

Senior Member
Interactive picaxe html server

So what does it take to make a picaxe web server interactive?

I modified the previous test html page to output a radio button control with 10 options. I added html TABLE tags for the radio buttons, and crucially, added a "form" tag as follows:

<form name='f1' method='get' action='%'>

This gives the form a name, "f1" (which is not used anywhere here), specifies the same "get" method that a normal, non-interactive html request uses, and gives the "action" attribute a value of "%". Normally this would be the name of a cgi script (such as "boiler.sh") which would be executed by the html server, but the attribute value is returned after the "/" in the http request, and we can use a single character (any character you want if not otherwise used in the SELECT) in the existing picaxe "SELECT" statement to process the value returned.

Each radio button option is written in a loop, and is specified by a line like the following:
Code:
<input name='R' type='radio' value='0' onClick='this.form.submit() '>setting 0<br></TD></TR>
The value of the "onClick" attribute causes the form to be submitted as soon as a button is clicked--no waiting for a <Submit> button click. For a selected radio button, the "name" (with a single-character value of "R"), and the "value" (with a single-character value of "0") will be returned with the action value ("%") as follows:

http://192.168.1.106:8106/%?R=0

The picaxe SELECT code sees the "%" select option and picks up the value, ("0" in this case), and builds a return web page showing the value of the button selected. This is, of course, just an example, and much more elaborate pages could be built. This fairly minimal code occupies 1265 or so bytes of the 2000 available on the picaxe 14M2. That leaves some room to play, especially on a larger picaxe.

Here is the picaxe code:
Code:
'14htmlServer2.BAS serves html pages 
#picaxe 14M2 
#no_data

symbol baudrate=t4800_4
'symbol baudrate=t1200_4

symbol value = b2
symbol loopCounter = b13

start:
  pause 2000
  sertxd ("14htmlServer2 ",#b13,13,10)
  serout b.5, t4800_4,("14htmlServer2 ",13,10)

main:
  do
    b10 = 0
'    serin [5000,skip], b.4, baudrate, ("GET /"), b10
    serin [5000,skip], b.4, baudrate, b20, b21, b22, b23, b24, b10,b25,b26,b27,value
    sertxd (b20, b21, b22, b23, b24, b10, b25, b26, b27,value," ")
    if b20 = "G" and b21 = "E" and b22 = "T" then
      sertxd ("GET ",b10,cr,lf)
      select b10
        case "t"
          readtemp c.2, b11
          b11 = 22
          gosub sendHeader
          serout b.5, baudrate,("Content-Length: 1273",cr,lf,cr,lf)
          gosub sendBeginning
          serout b.5, baudrate,("<p>Temperature: ",#b11)
          gosub sendEnding
        case "x"
          ' ...
          gosub sendHeader
          serout b.5, baudrate,("Content-Length: 1268",cr,lf,cr,lf)
          gosub sendBeginning
          serout b.5, baudrate,("'x' was entered")
          gosub sendEnding
        case "%"  ' value returned
          gosub sendHeader
          serout b.5, baudrate,("Content-Length: 1268",cr,lf,cr,lf)
          gosub sendBeginning
          serout b.5, baudrate,(value," was entered")
          gosub sendEnding
       else
          gosub sendHeader
          serout b.5, baudrate,("Content-Length: 40",cr,lf,cr,lf)
          serout b.5, baudrate,("<html><body>Page Not Found</body></html>",cr,lf,cr,lf)
      endselect
    endif
    pause 2000
   skip:
     if b10 = 0 then
      serout b.5, baudrate,(#b12," ")
      sertxd (#b12," ")
     endif
     inc b12
  loop

sendHeader:
  serout b.5, baudrate,("HTTP/1.1 200 OK",cr,lf)
  serout b.5, baudrate,("Content-type: text/html",cr,lf)
  serout b.5, baudrate,("Connection: close",cr,lf)
  return

sendBeginning:
  serout b.5, baudrate,("<html><head><title>Test Title</title></head><body>")
  serout b.5, baudrate,("<form name='f1' method='get' action='%'>")
  serout b.5, baudrate,("<p>Click a button to set something</p>")
  serout b.5, baudrate,("<p><TABLE BORDER='1' CELLSPACING='0' CELLPADDING='5'>")
  serout b.5, baudrate,("<TR><TD>Device</TD></TR><TR><TD>Setting</TD></TR>")
  for loopCounter = "0" to "9"
    serout b.5, baudrate,("<TR><TD><input name='R' type='radio' value='",loopCounter) 
    serout b.5, baudrate,("' onClick='this.form.submit()'>setting 

",loopCounter,"<br></TD></TR>")
  next loopCounter
  serout b.5, baudrate,("</TABLE></p>")
  return

sendEnding:
  serout b.5, baudrate,("</form></body></html>",cr,lf,cr,lf)
  return
Here is the html code which is output when radio button 0 is selected (with some line returns added for the sake of clarity).
Code:
HTTP/1.1 200 OK
Content-type: text/html
Connection: close
Content-Length: 1268

<html><head><title>Test Title</title></head><body>
<form name='f1' method='get' action='%'><p>Click a button to set something</p><p>

<TABLE BORDER='1' CELLSPACING='0' CELLPADDING='5'>
<TR><TD>Device</TD></TR><TR><TD>Setting</TD></TR>
<TR><TD><input name='R' type='radio' value='0' onClick='this.form.submit()'>setting 0<br></TD></TR>
<TR><TD><input name='R' type='radio' value='1' onClick='this.form.submit()'>setting 1<br></TD></TR>
<TR><TD><input name='R' type='radio' value='2' onClick='this.form.submit()'>setting 2<br></TD></TR>
<TR><TD><input name='R' type='radio' value='3' onClick='this.form.submit()'>setting 3<br></TD></TR>
<TR><TD><input name='R' type='radio' value='4' onClick='this.form.submit()'>setting 4<br></TD></TR>
<TR><TD><input name='R' type='radio' value='5' onClick='this.form.submit()'>setting 5<br></TD></TR>
<TR><TD><input name='R' type='radio' value='6' onClick='this.form.submit()'>setting 6<br></TD></TR>
<TR><TD><input name='R' type='radio' value='7' onClick='this.form.submit()'>setting 7<br></TD></TR>
<TR><TD><input name='R' type='radio' value='8' onClick='this.form.submit()'>setting 8<br></TD></TR>
<TR><TD><input name='R' type='radio' value='9' onClick='this.form.submit()'>setting 9<br></TD></TR>
</TABLE>
</p>0 was entered
</form></body></html>
So there you have it--a wireless picaxe interactive web server using the HLK-RM04 and a PICAXE 14M2 for around $20US.
 

Attachments

Last edited:

lbenson

Senior Member
To improve the response, I upped the baud rate to 19200--in both the picaxe program and on the HLK-RM04 setup page. I adjusted the pause and serin timeout values to suit.

All works fine in Opera, Firefox, Safari, and Chrome, but with Internet Explorer only the "/t", "/x", "/other" options work--not the radio buttons (that also didn't work before I increased the baud rate).

I'm not sure why that is--maybe as simple as my "Content Length" count not being right in the initial "/t" request, or perhaps some other technicality with the headers. In monitoring the tcp port 8106, I can see that the GET for the radio button selection is not even being sent from IE, so the problem is not on the picaxe side.
 

JimPerry

Senior Member
lbenson;248787 said:
works fine in Opera, Firefox, Safari, and Chrome, but with Internet Explorer only the "/t", "/x", "/other" options work.
What Operating System? and version of IE? :confused:
 

Hemi345

Senior Member
% is not valid for the action attribute. Since you don't actually have any separate pages, remove the Action attribute from the form tag and IE will submit the form to the source page.
 

lbenson

Senior Member
Hemi345--that was it. I replaced "%" with "z", and now both selecting pages and selecting a radio button work on all 5 browsers I tested--Opera, Firefox, Safari, IE, and Chrome.

I wanted to use a single-character action attribute so that I could use the same SELECT statement to differentiate pages and radio button selections.

Nominally I do have 2 separate pages, designated by "/t" and "/x". I wanted the structure of the program to be such that a user could have as many pages as desired by adding additional CASE statements to the SELECT.

Thanks.
 

Hemi345

Senior Member
Cool you got it working. The wireless will be great for remote projects where you don't want to string ethernet. I think having the PICAXE act as the webserver is a huge benefit in power consumption vs having a PC powered up to collect the data and provide the interface (1.5W vs >85W). It's definitely challenging but kinda fun to make the PICAXE do it all.

I'm using an EEPROM with mine to store all the HTML headers and markup and read out what I need where I need it. My 14M2 ran out of memory pretty quickly with just a basic webpage. Moving most of it into the EEPROM, I sorta went overboard dressing it up since I had the means to. :) I have some shared hosting that I link to for a custom css stylesheet and everything else, like jQuery and plugins. I just added graphing to the stats I'm collecting every time the furnace kicks on from my PICAXE-powered humidistat. Next I'd like to add a menu so I can choose what day to display the stats from (since I can collect a month or more of data depending on how often the furnace runs).
 

Attachments

lbenson

Senior Member
Nice, Hemi345. I was thinking that the next step would be external EEPROM or uni/o on a 20X2 or better. I do like the 14M2 chip--just the right size for a lot of things.
 
Top