Hi everyone, I have a project where I want to provide some additional fuel to a vehicle for improved throttle enrichment. I need some help with a TPS (throttle position sensor) rate of change (ROC) function. I have written some code reads the TPS in a timing loop. it accumulates the difference between increasing values, the result is a 0-255 value. The code is pretty ugly, a bunch of if..then statements. Does anyone have an equation that accumulates sample differences of increasing values or an equation that could be modified for this purpose? Sampling frequency is a significant issue. I guess I probably want to average a few readings then wait a period of time, then resample. The time between measurements will greatly affect the rate of change value. If it is quick, like 10 msec, it will be very difficult to measure because the TPS is a human activated event. If sample time is long like 1 second, the event is over before the system can react. I believe that 100 msec between averaged samples will work. Does anyone have any strategy ideas? Thanks in advance Jon