Measure Amplitude of Optical Signal

I’m a trying to measure the amplitude of a VLC signal. The signal is shown in the attachment plotted with the serial plotter.
Does anybody know how to measure the average amplitude over a period of approximately 10 seconds?


Google Arduino smoothing and/or Arduino running average

I'm only interested in getting the average sensor value of receiving a 1 and the average value of receiving a 0, so that I can get the difference between the two, not the average of the signal as whole.

  1. Pass your data via HPF.
  2. Calculate RMS.