How do I trigger an active buzzer with a water sensor?

Hello, I am extremely new to this, I am working on a pipe leak detector for class, and with some tutorials, I got a water sensor and an active buzzer working. However, I only managed to get them to work separately and I do not know how to get the water sensor to trigger the active buzzer. I've attached the buzzer and water sensor code, please help.


Welcome to the forum

Please follow the advice given in the link below when posting code, in particular the section entitled 'Posting code and common code problems'

Use code tags (the < CODE/ > icon above the compose window) to make it easier to read and copy for examination

https://forum.arduino.cc/t/how-to-get-the-best-out-of-this-forum

Oh, you're almost there. I assume you used this tutorial

Using your sensor sketch, follow the "Water Level Sensor Calibration" towards the bottom. This will establish your threshold.

Then use the "How To Detect Water Leakage" section and sketch. Rather than an LED, you are using an active buzzer.

Good Luck

2 Likes

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.