Tablet and smartphone interface to Picaxe project using net server

geoff07

Senior Member
This is a description of a web-based user interface to a Picaxe project. It was very simple to build, using the Picaxe net server.

It is part of a home automation project which I will report on separately when it is completed in the near future. That will include easy code to access the net server lcd and other features, should you need it, though it really isn't hard to do it from scratch.

The hardware needed is

- Picaxe net server
- AXE022 project board or your own equivalent (but why go to all that trouble when it is already done for you?)
- 28X2 or 40X2 (other, obsolete chips can be used)
- an IP network (with wireless if you want tablet or smartphone access)

To test my web pages without a net server, simply unzip the files into a folder on a computer and point the browser at index.html.

You will then see

- a menu page linking to two pages
- a page that controls setpoints in a heating project
- a page that allows you to read and change part of the shared smemory area (bytes 24-49)

From these you can create many of the interface requirements for suitable projects. Where you see e.g. '?24', on the live web pages that would be replaced by the value of ram location 24.

See the photos which show these pages on my tablet and my smartphone.

The net server documentation explains the format of the dynamic parts of the html. The best way to get started is to hack my code and the Rev-Ed examples supplied with PE.

This is the smartphone showing one of the web pages:
IMGP1062crop.jpg

As the system isn't yet installed it is showing the temperature in my workshop!

How it works

The net server itself (a black box) has access to a built-in DS1307 RTC chip. As well as telling the time, it has 56 bytes of shared battery-backed ram memory accessed using i2c by both the net server and the Picaxe. Some of this is available to your Picaxe project so that data can be shared between the Picaxe app and the web pages. Web pages are edited and tested on your PC and then downloaded into the set server using a PE Wizard in a few moments. Data from this ram can be easily included in web page text in a variety of ways.

The Bad news

Sadly, just as I got to grips with the net server that I bought some time ago for an ambitious but failed project, Rev-Ed have obsoleted the product, which is in a 'while stocks last' situation. Probably they didn't sell enough because the price when introduced looked high. However, I have not found an alternative that comes anywhere near the simplicity of this one. No installing Apache, or LAMP, coding in 'C' or other complexity, just a few simple bytes of shared hardware and a little easy html, and you have Tablet or Smartphone access to your Picaxe project.

If Rev-Ed think about making a V2 net server, (and IMHO they jolly well should!), then some slight functional and cost improvements could be made:
- the lcd, though useful, isn't essential so could always be added as an i2c attachment
- hardware like the DB9 socket and the led tower aren't really very necessary
- a wifi chip would make it suitable for mobile projects as well as fixed ones
- enabling Picaxe code downloads for current chips over the network would be very nice too (the excellent manual has an unfortunate error in it, suggesting that chips later than 28/40X can be downloaded)

The Good news

There are stocks, though I don't know how many. The price is not so high that it prevents its use in suitable projects. In my case the commercial alternative to what I am building costs £180 and does not include web access, so this is much cheaper, ignoring my time of course.

So for a 'modest' price and very little work you get tablet or smartphone access to your project to share data and control settings. And if you tackle your firewall you could have access from anywhere in the world. In the UK if you have a BT router and are in range of any BT router anywhere else in the UK, or are in an office, that access would be free!

The web pages are attached in a zip file. The smartphone image is included above, and, due to an upload limit on this forum, the tablet image will be in a second post shortly.
 

Attachments

MPep

Senior Member
Well done Geoff.
Looks great.

I must say that I was tempted into buying a NetServer, but the price put me off.
There are may alternatives, really good (low!!) prices. Unfortunately I can program in BASIC, but not much else :(.
 

neiltechspec

Senior Member
I think the pricing killed off the NetServer.

I was considering one for my webpage for Solar Array Stats, but went down the RPI route instead entirely due to the cost difference.

It was a far more complicated exercise to use an RPI and I had to enlist help from a mate who's a PHP expert (was a bit beyond me I have to confess).

Neil.
 
Top