Membuat Alarm otomatis pendeteksi air menggunakan arduino
program yang digunakan :
YOU WILL NEED:
8-ohm speaker
100-Ohm Resistor
2 jumper wires / 2 alligator clips
CIRCUIT:
100 Ohm resistor connected Arduino Pin 8
Other side of resistor connected to the positive terminal of the speaker
Negative termial of the speaker connected to Ground
created 21 Jan 2010
modified 31 May 2012
by Tom Igoe, with suggestion from Michael Flynn
heavily modified Jul 2014 by
Michael James
http://www.programmingelectronics.com/
http://arduino.cc/en/Tutorial/Tone2
This code is in the public domain
*/
void setup() {
pinMode(8, OUTPUT); //The Speaker is attached at this pin
}//close setup
void loop() {
//Tone takes three arguments tone(pin, frequency, duration)
tone(8, 2000, 1000);
//The loop does not wait for the tone to finish, so lets delay to here 2 seconds to hear
//one second of noise and one second of silence - essentially a beep
delay(2000);
}//Close Loop
selengkapnya :
http://www.instructables.com/id/Basement-Flood-Alarm-Arduino/
https://programmingelectronics.com/how-to-make-an-arduino-water-detection-alarm-project/
Komentar
Posting Komentar