I 'am new to Arduino. I would like to modify this sketch to have the buzzer activated by mutable water detectors on mutable inputs and turn on output for each input.
/*
Edited Code from:
Rain Detector with Water level sensor
by Hanie kiani Learn Electronics at ElectroPeak - Step by Step Guides & Tutorials
*/
const int sensorMin = 0; // sensor minimum
const int sensorMax = 1024; // sensor maximum
const int buzzer = 9;
void setup() {
Serial.begin(9600);
pinMode(buzzer, OUTPUT);
}
void loop() {
int sensorReading = analogRead(A0);
Serial.println(sensorReading);
Probably the best thing you can do is read the guidelines on how to use this forum. Post your code properly and also post an annotated schematic. I do not do good with frizzies or word problems.
Probably the best thing you can do is read the guidelines on how to use this forum. Post your code properly and also post an annotated schematic. I do not do good with frizzies or word problems.
To post code, open a reply, click on the </> button at the top of the message window, then paste your code where prompted.
To get the code to post, in the Arduino Development Environment (a.k.a. IDE) find the menu item that says "copy for forum" and click on it. But before you do that, press ctrl-T to reformat the code.
Works great, I added A2-A5 inputs now I need and output to turn on a LED that corresponds to each input.
I want to use this to monitor for water leaks it the laundry room and under sinks.
This works good, but what I need is the LEDS to be turned like
A2 turns on output 2
A3 turns on out put 3
A4 turns on out put 4
A5 turns on output 5
A6 turns on output 6
A7 turns on output 7
Each input corresponds to one output.