Hi All. Thank you to all those involved in contributing to this important open source application.
I am using a Feather M0 under the arduino ide 1.x and have successfully modified the EmonLib code to work with the SAMD21 ADC. To do so I also modified the adaino SAMD ADC library to operate in a way such that the ADC readings are captured and stuffed into multiple ring buffers (using interrupts), one for V and one for each current channel.
This is ok for starters but I would like to implement continuous monitoring and I have been struggling to get anywhere with modifying the emonLibCM library to work with the SAMD21 ADC.
Please note this is not a criticism of the emonLibCM software in any way!
The modified adaino library results in arrays of raw ADC values representing voltage and current readings and provides functions to peek an read these values (in the foreground) and detect buffer or device overrun conditions.
Theoretically it should be relatively easy to modify emonLibCM such that it obtains its readings from this simple buffer interface of V and I readings but I am not getting anywhere fast.
Has anyone done this (emonLibCM with SAMD21) or can anyone point me in the right direction for some example source code ?
Obviously I will be glad to share my resulting source here for all to use.
Best regards,
ozpos