analog values

Hi everyone,
i am trying to read analog values of 3144 hall effect sensor and then use these values to control different LEDs. But the problem is the analog values i am getting aren't constant they keep on varying even if i place the sensor&magnet at a stationary position.

//
float hallpin1 = A0;
float hallpin2 = A0;
float hallpin3 = A2;
float hallpin4 = A3;
float hallState1;          // variable for reading the hall sensor status
float hallState2;
float hallState3;
float hallState4;
void setup() {
  Serial.begin(9600);
   
// the number of the hall effect sensor pin
const int ledPin =  13;     // the number of the LED pin
//// variables will change:
//
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);      
  // initialize the hall effect sensor pin as an input:
  pinMode(hallpin1, INPUT);
  pinMode(hallpin2, INPUT);
pinMode(hallpin3, INPUT);
pinMode(hallpin4, INPUT);     
}

void loop(){
  // read the state of the hall effect sensor:
hallState1 = analogRead(hallpin1);
Serial.print("Hallstate1 = ");
Serial.println(hallState1);
delay(300);
hallState2 = analogRead(hallpin2);
Serial.print("Hallstate2 = ");
Serial.println(hallState2);
delay(300);
hallState3 = analogRead(hallpin3);
Serial.print("Hallstate3 = ");
Serial.println(hallState3);
delay(300);
hallState4 = analogRead(hallpin4);
Serial.print("Hallstate4 = ");
Serial.println(hallState4);
delay(300);

}

Are you in a magnetically shielded room? How much do they vary? What is the output impedance of your sensor?

The datasheet I found for the (DISCONTINUED) Allegro A3144 Hall Effect SWITCH shows that it is a SWITCH, either ON or OFF, not an analog sensor. Does the datasheet for your "3144" say otherwise? If so, who made it?

I find it quite normal for the ADC to vary by 1-2 points between measurements. It's not perfect, it's analog after all. Minor electrical noise (or magnetic, in your case) can easily cause such variations.

If it acts as a switch, it's a whole different story of course.