I have a RPi and attached to an input pin I have an ADC (MCP3002) and an op-amp (MCP601) and a piezo element connected to them. The RPi reads the input pin, gets the digital data and at the moment generates a graph using Matplotlib.
I want to take this data and store it in a meaningful way so I can analyse the input from the piezo and determine the frequency of the vibration. I understand I may need to use a codec (not sure how to develop using this) and to get the data I plan on using FFT algorithm to establish the frequencies present. The code I have used is an adaptation of the code found here
The voltage generated is digitized and converted to it's digital number equivalent and plotted on a graph to generate a waveform graph. I just want to convert it to a WAV file or something that can be analysed effectively using FFT.