Page 1 of 1

Burglar Alarm Code

Posted: Wed Jul 22, 2009 8:36 pm
by bodexchrist
Hello,

I have really been trying to write a flow code for the burglar alarm task in the learning centre but that seems like an herculean task for me now because i am a beginner.Can somebody be kind enough to attach a sample flow code of the burglar alarm .


Regards.

Re: Burglar Alarm Code

Posted: Thu Jul 23, 2009 8:23 am
by Steve
We can't really help with providing specific programs for you. If we did this, then we would be completing the assignments of hundreds of students every month. The best way to learn is to break the problem down and start slowly.

Flowcode is actually much easier to learn than traditional languages such as C and Basic, but you will still need to put effort in to become proficient in it.

If you have specific questions about a certain aspect of the program, then this will be easier to answer for you.

Re: Burglar Alarm Code

Posted: Thu Jul 23, 2009 9:03 am
by bodexchrist
I quite understand that.Well i actually need a starting point.Where do you advice that i start from and what components do you think i need ?

Thanks

Re: Burglar Alarm Code

Posted: Thu Jul 23, 2009 9:31 am
by Steve
You need inputs to turn the alarm off and to detect intruders. And you need outputs to flash a warning light and to sound an alarm.

A very basic burgular alarm will set an output high (e.g. connected to an alarm) whenever an input goes high (a door is opened and breaks a contact switch).

You might also need additional inputs - a keypad or some switches - to enter a code, and perhaps a LCD to display the status, etc.

My advice is to start small and implement a basic design. Once this is working, build on it to add additional functionality and to improve it.

Re: Burglar Alarm Code

Posted: Thu Jul 23, 2009 11:30 am
by bodexchrist
I have written a couple of simple programs already including keypad password program. I would like to know if thereΒ΄s any hardware component for the alarm and moreso, i couldnΒ΄t find any help on how to use the alarm?? My questions looks stupid please tolerate me because i am an enthusiastic beginner.

Re: Burglar Alarm Code

Posted: Thu Jul 23, 2009 11:59 am
by Benj
Hello

If you click on the small down arrow at the top of the Alarm component and choose Component Connections you will see how the Alarm component is connected to the target microcontroller.

Using this you can read the inputs using input icons set to single bit mode. You can also output to the alarm using an output icon in single bit mode.

Everything is an input except for the Alarm indicator which is an output.

Hope this helps.

Re: Burglar Alarm Code

Posted: Wed Jul 29, 2009 7:36 pm
by bodexchrist
Hello,

I have honestly tried my best ,this is what i have done so far concerning the burglar alarm and it is giving me lots of headache.My idea of the program is: the user will enter a code(two numbers),if the code is valid led light is turn on but if it is not the alarm will sound will the lights off.So far i have done the first part which is the code, and i have also tried the other part but it doesnΒ΄t seems to be working.Could you please check my code and comment about it.


Regards