-->
Page 8 of 11

Re: I/O monitor with auto refresh and display update

PostPosted: Mon May 01, 2017 2:34 am
by ardhuru
Pierre wrote:The only disadvantage is that I need to change the times in the code when I want to change the switch on or off times.
Regards
Pierrre


Or, you could create a data file holding those constants, which your main code reads for the values. Lesser chances of you inadvertently (mis)editing the code.

That way, to change those values you merely edit the dat file.

Regards,

Anand

Re: I/O monitor with auto refresh and display update

PostPosted: Mon May 01, 2017 8:55 am
by Pierre
Thanks for that, never occurred to me. Don't know the code how to do that, but I will look into it.

Regards
Pierre

Re: I/O monitor with auto refresh and display update

PostPosted: Mon May 01, 2017 9:18 am
by ardhuru
Create a file called, say, "myfile.dat" in the /data/ folder on the ESP flash, containing your actual data.

To read it,

mydata = read.val("myfile")

Re: I/O monitor with auto refresh and display update

PostPosted: Thu May 04, 2017 12:18 pm
by Pierre
Got it to work and it is reasonable stable, mainly by reducing the number of info displayed on the webpage with the advice from Electroguard . One more question, if anybody can help. It seems to be stable if only one device is connected to the ESP. It is not running in AP mode, but connected to a wifi hotspot in my house. The moment that a second connection is made from another device to the ESP, it falls over and you need to restart. Is this issue also related to unstable behaviour as discussed on the previous pages?