util.py

download
#!/usr/bin/python

MAX_EMF = 1023.0
K_E = 0.120 # Volts/RPS
V_REF = 3.3

def cvtStrideFreqToEMF(freq):
    return int((freq *  K_E) * (MAX_EMF / V_REF))
download