Hello,
2 things... If You just wanna do the measurement one time you can do like I show you in the example.
I you wanna do that measurement as the graph it's growing in the graph, you should have an empty array connected to a shfit register that grows as your graph and the amplitude measurement inside the loop.
Software developer
www.mcm-electronics.com
PORTUGAL