After banging my head on a wall trying to get all the features I want in the end result out the door on the first go, I have decided to get a preliminary unit up and running with just a few simple commands. The hardware should not need to change, so I should be able to just work on the software of a second ESP unit, and when I get it running, swap the two of them out.
The path to where I am now:
- Program an arduino to speak with an ESP over AT commands. I couldn't really ever get this one going.
- Program an ESP with the arduino ISP. I struggled to get the IDE to talk to the unit. I don't recall ever getting it to talk even once.
- Program an ESP with the nodeMCU platform - works like a charm. The only problem is, I am what you would call a super-amateur programmer, so learning the Lua language and formatting is a bit of an uphill battle. There seems to be plenty of online documentation to assist, however. I am writing code in notepad++, and uploading with the LuaLoader software.
I have a proof-of-concept piece breadboarded up, as shown in the picture. The arduino is just there as a form of 3.3v and serial comms.
The other picture is of a program, Perfy. I backed the perf+ kickstarter, and got the boards a little while back. I thought this would be a good chance to give it a test run. The immediate problem I see is that the through holes are smaller than on a standard perf board. The Perfy program is handy, but with the current iteration, there is no way to mark what pads are for what devices, so if you are trying to pack it in tightly, it is tough to remember where exactly all the components go.
The troubles I am having with the remaining featureset seem to all stem from being able to serve the webpage with all the relevant info on it. The nodeMCU firmware is limited to 1460 characters at a time in conn:send, or the buffer, and while I can successfully break up the HTML code into separate chunks, and send them consecutively, that only works for a little while. I can't manage to get all 5.5k characters out the door.
Attempts:
- Creating separate buffer variables, and sending them one after the other
- conn:send (first 1400 characters) conn:send(second set of 1400 characters) etc. This one works up through the third set of 'send', but hits a timeout, or something. Last 2/5 of the page won't send.
- Creating separate 'pages' for each zone, as separate .lua files, all pointed at from a main page (.lua file). I think I ran into some global/local variable issues, but I haven't dug into it too much yet.
Hoping to have the perf board soldered up today, awaiting a new 24vac adapter to show up on Friday. I also need a new enclosure to put on the wall, but the HomeDespot should have what I need.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.