ArduinoTroubleshooting

sen0381 slow to respond

userHead Account cancelled 2021-11-26 00:56:00 794 Views0 Replies
Hello
I have purchased a few sen0381 proximity sensors and am finding them quite slow to respond to objects. It appears to take around 500 to 1000ms to detect an object. And if the object is moving even a few inches per second the sensor entirely misses detecting the event.
Is there anyway to increase the response rate?

In case you want to know I have no delays in the test code...it's simply the arduino button code.
Code: Select all
void loop() {
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed. If it is, the buttonState is HIGH:
  if (buttonState == HIGH) {
    // turn LED on:
    digitalWrite(ledPin, HIGH);
  } else {
    // turn LED off:
    digitalWrite(ledPin, LOW);
  }
}
Thanks,
Nick