Now i have finished 'desktop' testing of the software and hardware. Some findings
- GPIO16 cannot be used in INPUT_PULLUP. It just gets stuck (value not chaging). Adding external 10k pullup does the trick and does not seem to interference other stuff. There is 'INPUT_PULLDOWN_16' that is probably related to this
- Email sending does not work inside of 'ESP8266WebServer' callback, probably due memory issues. For debugging purposes i added serial command line option. At this point having serial also on a connector on case would be nice .. The main connector would have two pins left (and GND is common) - lets see how much debugging is needed.
Code updates:
- Web page view updated - see picture below. It works in static html and the C++ backend is serving json stuff from "/get/status" and "/get/devices" etc. Pretty good. I can do all html and JS debugging locally, with "python -m SimpleHTTPServer 8000"
- Otherwise debugging was pretty smooth, thanks to unittesting. Some prettyfications and someclear hardware-software glitches (like HC-SR04 sensor does not work with delay() it is delayMicroseconds())
- I added ThingSpeak support. Now a push (HTTP GET) is made every 15min. Its free, it has graphics included, seems good enough.
- I had also one 'email busy send loop' - got around 30 emails "sensor failing" to my gmail. Nice. I added limit of 3 emails per boot to not have it again.
Next: testing with the real thing (i have hydroponics stuff ready, now running with off-the-shelf timer).
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.