Updated mid-afternoon: Got up this morning to see I had a new email from Espressif – with a set of test files for me to try. I eagerly loaded them up, set up the access point and… it seemed to work – I started and stopped and started and stopped the App over and over, no problem.. I was getting excited and then…. “busy s…”. I changed my timeout to 2 seconds and ok, the timeout still occurs, BUT (fingers crossed, touch wood etc) up to now the NETIO App seems to recover gracefully… in other words, I can now create the “busy s…” condition.. but I can’t absolutely kill the app – yet. Espressif are aware of this and as I was replying anyway, I’ve asked them if they can change that pesky “no is fun” message to “Error” or something sensible. So it MAY BE that the AT command set is useful after all. Right now it’s the only thing that I can fall back on.
Meanwhile my temperature monitor test rig was still working fine – it looked rock solid (aside from the fact that as an ESP-01 user with no DHT-22 temperature chips handy I can’t actually DO anything with it). I noticed a Skype message from a pal who had trouble setting it up, he’d had to revert to other software to define the IP address so I thought I’d just check using a virgin ESP-01.
You know when something is working and you REALLY don’t want to disconnect it.. well, that’s me. Anyway… I blew the firmware into the virgin board. The light came on… and… it turns out the three boards I have already have the IP address setup from initially testing them – so I can’t progress that for now – they all work. In the process I noted the ORIGINAL HTTP server before Martin modified it – controls GPIO2 – which is what I actually want for test purposes (recall that on the ESP-01, GPIO2 is the only pin you actually have easy access to unless you want to solder onto the actual chip – and I don’t want to push my luck, though another pal managed it last night).
The source code for the original HTTP server is here. The only problem with THAT is… no binaries! (However if you look at the comments you will see that reader Jim has sent the link for the binaries). The actual repository is here. People looking in who have cracked this will wonder what the fuss is about – but I have been utterly unable, up to now to set up a working compile rig that generates usable binaries. I’m a Windows user with LOTS of knowledge of programming and almost no knowledge of (or interest in) Linux and for once it’s biting me. It certainly would be worthwhile getting a setup to edit and compile this code. Here’s what I’d like to do… after getting it to work reliably, I’d like to make that one pin programmable via the web interface to be an input for various temperature reading units, OR an output for a LED OR an output for serial LEDs, hence making it possible to control a whole batch of serial LEDs from the one pin.
That of course is just the beginning, the next stage would be to understand how to fire commands to the web page as parameters and have it fire stuff back in the form usable by the likes of NETIO which then turns it into a regular client for NETIO – which means instant Android Apps… but with that added advantage of the web page setup.
Looking for info here, anyone got this code compiling under Windows? Do you want to send some instructions?
HOWEVER – I have to say that the web server software has a MAJOR bug… unless your board has already been used with other firmware and has an IP address, it won’t see a list of routers – which kind of defeats the object.. I could not see any of my routers when this board was acting as a router itself… and there is no manual option. I wrote to Jeroen who wrote the software – his response..
Unfortunately, that’s a known issue I haven’t had the chance to take a look at yet. For now, you should be able top join a network using the AT firmware, then reflash the httpd stuff.
So while this has great promise – for now, no – again unless someone wants to get in there and fix it and has the necessary knowledge and skill. If you do – Please DO let us know in here. Jeroen says he will have a go at fixing this – and post updates here – I suggest that link is worth checking as that little web server has great potential….
I was just thinking of some other applications for this web server when I noted an article on solar panels. Someone had put together an Arduino solar panel tracker… and it occurred to me that this board if initially setup as as web client could go get the time from a time server before becoming a web server… and armed with that could do all sorts of things – for example, the one output pin could be used as a pulse width controller to a servo and hence depending on the time of day, point the solar panel at the sun. With just one more input pin it could also measure solar panel output and graph all of that on one of it’s web pages – all for a mere £3. Add a simple, cheap lithium battery charger that would run off the solar panel and one cheap lithium rechargeable…. So many possibilities…