How to measure frequency of analog signal using python APIs provided ?
Hi @Mina Sameh @abia
See the updated example: AnalogIn_FFT.py
iPeak1 = 0
vMax = float('-inf')
for i in range(5, nBins): # skip DC
if rgBins1[i] < vMax: continue
vMax = rgBins1[i]
iPeak1 = i
print("C1 peak: ", hzTop*iPeak1/(nBins-1)/1000,"MHz")
if iPeak1 < nBins: # weighted average
s = 0
m = 0
for i in range(-2,3):
t = pow(10,rgBins1[iPeak1+i])
s += (iPeak1+i)*t
m += t
iPeak1 = s/m
print("C1 peak weighted: ",hzTop*iPeak1/(nBi