Hey guys, I am new to using an arduino and I have a project to do for college which I am struggling with. I need to make an alarm system using an ultrasonic sensor, speaker, keypad and an LCD or processing.
So far I have only found a few sketches online and I am finding it difficult to put everything together. I would like some help with the coding and ideas on how to approach this.
Basically the alarm system should be like this: when you enter the house the ultrasonic sensor detects but doesn't sound the alarm so you have time to put in the code and deactivate it and when you activate it, gives 30 seconds to leave the house and doesn't go off straight away.
Shani00353:
Hey guys, I am new to using an arduino and I have a project to do for college which I am struggling with. I need to make an alarm system using an ultrasonic sensor, speaker, keypad and an LCD or processing.
So far I have only found a few sketches online and I am finding it difficult to put everything together. I would like some help with the coding and ideas on how to approach this.
Basically the alarm system should be like this: when you enter the house the ultrasonic sensor detects but doesn't sound the alarm so you have time to put in the code and deactivate it and when you activate it, gives 30 seconds to leave the house and doesn't go off straight away.
I am not surprised you are having difficulty trying to do the whole project in one giant step. Do each function first and get it to work and then the whole will be a lot simpler. Get the LCD to work with a program example. Then with another sample program, get the keypad to work. Then combine the LCD and keypad logic in one program. Get the speaker to work with example programs. Then add that logic to your LCD/keypad program. Finally get the ultrasonic sensor to work with an example program. And add that logic to the main program.
And suddenly you have a working project! Life works that way!
Paul
Another way is that you could search a similar project which is close to what you want. Of course, there are many kind of projects and may be it should be ideal for you. Good luck.
Paul_KD7HB:
I am not surprised you are having difficulty trying to do the whole project in one giant step. Do each function first and get it to work and then the whole will be a lot simpler. Get the LCD to work with a program example. Then with another sample program, get the keypad to work. Then combine the LCD and keypad logic in one program. Get the speaker to work with example programs. Then add that logic to your LCD/keypad program. Finally get the ultrasonic sensor to work with an example program. And add that logic to the main program.
And suddenly you have a working project! Life works that way!
Paul
Thanks for the reply Paul, I tried doing this way at the start and ran into problems when tried combining the codes together and couldn't get anything to work together
If anyone could show me a similar project or a sketch and help me edit it, that would be great.