Hello,
if someone is interested reading:
i tried that prevState proposal by tuxdino and tadaaah! Seems to work. Thank you ![]()
 int prevState = 0;
 int nowState = 0;
 // i'm two int variables
Â
void setup() {
 Serial.begin(9600);
}
void loop() {
 int sensorValue = analogRead(A0);
 prevState = sensorValue;
 // prevState gets the actual number
 delay (1);
 sensorValue = analogRead(A0);
 // read once again
 nowState = sensorValue;
 // nowState is even more actal!!!
 if (nowState>500 && prevState<500)
  {
   Serial.println("UP");
      }
 if (nowState<500 && prevState>500)
   {
    Serial.println("DOWN");
      }
}
Only thing i don't understand:
Every now and then the monitor doesn't change like tic tac between the two statements, but prints the same statement 'UP' or 'DOWN' twice - how can this happen? Once the analog signal goes from up to down it has to go up again to go down, right? This is a mystery to me... Might have something to do with debouncing?
Anyway, thanks everybody for reading and commenting. It helped me a lot.
(The next thing i want to do is count the time between the changes and print it insdead of printing UP or DOWN.)