if analog changes by 3 or more, runThis();

Any idea how to measure an analog input and evaluate if it has changed by more than 3 digits or something like that? Where would I find something like that? I don't want an alarm for a set temperature, I want to know if the temperature is changing faster than it should... Thanks.

Take the current reading and subtract it from the last reading.
Use the abs() function to remove any sign.
See if the result is greater than two.

What do you mean by 3 digits?

Mark

@Grumpy_Mike
Thank you. I am working on that now...

@holmes4
Well, let's say that if the an0 reads 602 ( a result between 0 - 1023) and the next time it is read it is 604, I don't want anything special to happen... But if it reads 604 and then next time 607 or more, I want to know.

OK, this is what I have...

aRead0 = analogRead(0);
  Serial.println(lastaRead0 - abs(aRead0)); // visual confirmation
  if((lastaRead0 - abs(aRead0)) < 3){
    lastaRead0 = aRead0;
    flagBit = true;
  }

It sort of works... I get a negative number if I go one way on the potentiometer, and I get a positive number if I go the other way... All I want to know is the difference, I don't care to know if it is positive or negative... Can this be done?

abs()

Try

if(abs(lastaRead0 - aRead0) > 3){

@Grumpy_Mike
I'll try it but the reference page says that doing math inside that function can cause bad results...

No it doesn't.
Doing maths (or even simple arithmetic) inside a function is a Good Thingtm

OK, apparently I misread this then...

http://arduino.cc/en/Reference/Abs:
Warning
Because of the way the abs() function is implemented, avoid using other functions inside the brackets, it may lead to incorrect results.
abs(a++); // avoid this - yields incorrect results

a++; // use this instead -
abs(a); // keep other math outside the function

Are you doing any pre or post increments?
No.
So, it isn't a problem.

Ahhhh I see. Thank you for your help. It seems to be working great.

The reason "abs" can be a problem is that it is a simple text-replacement pre-processor macro.
If "abs" looks like #define abs(x) (x<0) ? -(x) : x, then if you write y =abs(i++);, then what the compiler sees is y = (i++ < 0) ? -(i++):i++;

See the problem?

@AWOL
Thanks for the lesson here. Although I do not understand much of the first code and what all the operators do, I do see the difference in the complexity though and kinda understand what you're saying.