Hall effect sensor US5881LUA doesn't work with internal pull up resistor?

Hey there,

I'm trying to get US5881 working with my Arduino UNO without an external pull-up 10K resistor. I want to use the internal resistor.

No matter what I'm trying to do or whatever magnet I'm using, I'm not getting any signal from the sensor. Doesn't it work with the inernal pull-up resistor?

Here's a small sample code what I'm using to debug this thing:

void setup() {
  // put your setup code here, to run once:
  Serial.begin(115200);
  pinMode(2,INPUT);
  digitalWrite(2,HIGH);
  
}

void loop() {
  // put your main code here, to run repeatedly:
  if(digitalRead(2)== LOW){
    Serial.print(millis());
    Serial.println(" ON");
  }else{
    Serial.print(millis());
    Serial.println(" OFF");
  }
  delay(100);
}

For proper operation, a 100nF bypass capacitor should be placed as close as possible to the device between the VDD and ground pin.

Do you have the cap installed?

The US5881 is unipolar … you’re US5881LUA package is south pole active - using any other magnetic field will not affect its output.

https://www.arduino.cc/en/Tutorial/DigitalPins

Prior to Arduino 1.0.1, it was possible to configure the internal pull-ups in the following manner:

pinMode(pin, INPUT); // set pin to input digitalWrite(pin, HIGH); // turn on pullup resistors

Leo..

Still can as far as I know.