problem with hall sensor

hello

I need a hall sensor for my project to measure rpms around 2000. For this reson I dicded to buy a hall sensor to do that. I bought: http://www.ebay.com/itm/290625657226?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649 But I cant get it work in any way. Here is my code for testing:

int sensorValue = 0;        // value read from the pot
const int analogInPin = A2; 

void setup() {
  // initialize serial communications at 9600 bps:
  Serial.begin(9600); 
}
void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);   
  Serial.print("\n");
  Serial.print(sensorValue);  
  delay(500);   
}

the 3rd pin is connected to A2 the middle pin to GND and the 1st (left) pin is connected to 5V.

I have tried it even with neodym magnets - nor direction gives any other return than 0 sometimes the values rise slowly to 10-100 and than gradually decrease - kinda strange...

I hope you can tell me what I am doing wrong

best regards, max The only data sheet I found

So how have you wired it up!

That sensor needs a pullup resistor between pin 3 and +5v. Simplest way is to enable the internal pullup resistor in the Arduino on that pin. It's a digital sensor, so you will only get a logic low or high out of it, and you should use digitalRead to read its state.

You can enable the pull up resistor on the analogue pins as well with a digitalWrite(A2,HIGH); In the setup() function.