so I want to use the analog input to measure a 0-5v sensor.
and I have that just fine
but I also want to be able to see the velocity/voltage change over a specific period of time
I know its as simple as analogRead to get the main value
and I know I can then use current value -PrevReading
but I need it for longer than 1 frame...
I need it to do that math over 1ms and keep updating it giving me the differences from the new value and whatever the value was 1ms ago,
my analog signal is being fed to another device at a rate one value every 0.1 ms
and I need that delta value to be sent out at that same rate as it updates calculating from a value 1ms ago
so example would be
example would be at 0ms, valueA = 3
at 0.1ms value A = 3.2
at time 1.0ms, valueA is 4
delta value would be 1.0
at 1.1ms, valueA is 3.9
so delta would be 0.7
storing 1ms worth of values to be able to do the comparison and always doing First in First out math
is this possible??