Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By OldBikerPete
#55658
Watering_0.03.zip
ArduTime.zip
MCP2301x.zip
Watering_0.01.zip


I've been writing a sketch for the D1 mini. In general it is to be a timer for watering systems programmable by means of HTML forms. It uses a DS1307 clock module, an MCP23017 i2c I/O expander IC, A WeMOS micro SD card shield and a level-shifting module for 5V interfacing all on a custom prototype PCboard.
I was able to get all the hardware working together after 1> renaming the 'time' DS1307 library as a conflict with the IDE occurred and 2> writing a library for the MCP2301x IC. Both these libraries are attached.

The early sketch (v:0.01) with file I/O happening correctly is attached. This version needed the program files edited by a text editor in a PC. A later version which had enough HTML support to create programs and timing but in which File I/O from the SD card is not happening in all parts of the sketch is version 0.03, also attached. A 'data' folder in V:0.01 and V:0.03 contains the contents of the micro SD card appropriate to that version.

OVERVIEW.
The sketch starts in 'setup(()' by looking for 'setup.crd' which contains the SSID, passphrase and WiFi mode (Access Point or Client) which the unit is required to initialise. If this file is not found, or a button on the PCB is held down, the WiFi is initialised to be an unsecured access point and the webserver presents a form to an enquiring Web Browser on which an SSID, passphrase and WiFi mode required may be input. These credentials are then saved in 'setup.crd' and used to set up the WiFi accordingly. The web server is then initialised to present chains of forms to a web browser allowing the clock's time to be set and program files to be manipulated.

In 'loop()', a file (ambitiously) called 'chrontab' is repeatedly tested against the RTC until a time matches, when the appropriate program file is opened and executed, driving pins on the MCP23017 chip.

Can someone PLEASE plug this sketch into a debugging sytem of some kind an tell me where the problem lies - I'm at my wit's end.

Peter
You do not have the required permissions to view the files attached to this post.