// Continuity tester
// Connect probes to pin 2 and GND
// Connect speaker to pin 3 and GND

#define PROBE_PIN   2
#define SPEAKER_PIN  3
#define LED_BUILTIN 13

void setup() {
  Serial.begin(115200);
  pinMode(PROBE_PIN, INPUT_PULLUP); // probe
  pinMode(SPEAKER_PIN, OUTPUT);
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  bool probe = digitalRead(PROBE_PIN);
  if (!probe) { // probe has continuity
    delay(150);
    digitalWrite(LED_BUILTIN, HIGH);
    Serial.println("BEEP");
    tone(3, 1660, 50); // pin, Hz, duration
  } else {
    digitalWrite(LED_BUILTIN, LOW);
  }
}
Probes - one probe/wire on ground - one probe/wire on pin 2
<------"L" LED
Beeper