Example now checks for voltage zero cross going from negative to positive. The final sum's are only ever samples summed over an integer number of wavelengths ie: updating the total_sumV = sumV at the end of each cycle