Solar PV History Page

Hi This is not a problem more just an inquisitive question.

 

I am probably delving further than my brain is capable of  :).  I would like to understand a bit more how the history page works on the Emonglcd.

 

I can follow the code, but was wondering how it all fits together and stores the previous days kwh values to memory.

 

regards Paul

Robert Wall's picture

Re: Solar PV History Page

The values are stored in two arrays, ****_history. The first time around the loop after midnight (i.e. when the new hour is 0 and the last hour was 23), all the elements are moved down one place. The present value is always in element zero, and it is set to zero to start the new day's total. EEPROM memory is not used (but it can be) - so if power is lost, the history is lost too.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.