openenergymonitor / EmonLib

Electricity monitoring library - install in Arduino IDE's libraries folder then restart the IDE
openenergymonitor.org
GNU Affero General Public License v3.0
584 stars 418 forks source link

total KWH #33

Closed ahmedtayeh closed 7 years ago

ahmedtayeh commented 7 years ago

hello, I firstly i would like to thank you guys for this amazing work. I am actually trying to modify the current voltage example to get the total accumulative KWH. my idea was to take the real power samples lets say 3600 sample per hour, and add them to get 24 hour for one day. any alogorithem recommended other than this. another issue is that i was trying to understand the source code to figure every how long it takes samples from the current and voltage sensor.

thanks

glynhudson commented 7 years ago

See Wh accumulator sketch example: https://github.com/openenergymonitor/emonTxFirmware/tree/master/emonTxV2/emonTx_continuous_watthours