ADC with tone out and hysteresis
Hi
After looking to the examples above I have the following I want to do
As this is my first ADC code I need some tips and maybe some help
I want to do the following
ADC on GPIO.0 8 bit
I have a DC voltage between 0.5V and 2V approx
Which is varying all the time
I need to encode the DC variation by a tone between 67hz and 250hz
with 2-4 hertz incremental/value
The DC values needs to be stored in EEprom at setup
(example button is pushed at powerup to enter setup)
30 DC values should correspond to 30 tones (30 tone's might be set fix in the code)
So example:
0.55V = 67hz
0.64V = 71hz
0.71V = 74hz
etc...
Once setup and running: if a DC value is between or equal next value it has to
output the tone ( set in the code)
with a kind of hysteresis for the tone duration and before next sample)
and a Serout to check the values
Can anyone help me ?
Walter