problem with hall sensor


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: 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:
void loop() {
  // read the analog in value:
  sensorValue = analogRead(analogInPin);   

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.