# An Interesting C++ Project Idea...



## InterKnight (Oct 19, 2004)

Hello, everyone.

I am thinking of beginning research to complete a project for my PC course next quarter. I had an idea which was brought to me by the professor of the course, and I was wondering if any of you would have any ideas of what I would need to look into and so forth. It seems like a pretty good idea, and I am sure it can be done.

Here is basically what the project would incorporate:

The project would be to program a security system. Basically, I would use a serial cable (using one of my COM ports) with wireless magnetic switches. The switches would be stationed in areas such as on the windows and doors of my apartment.
What the program (I am hoping it could be done in C++...I am sure it can) would do is monitor the bit at the addresses of the wireless magnetic switches. When a switch would be triggered (for example if a door was pushed or broken open) its bit would be changed, thus sending a signal back to the program monitoring the wireless switches. In the occurrence of this event, the program would then send an alarm (preset by me) to the computer speakers.

I am pretty sure this would be possible, but I am not exactly sure where I would need to look to learn how to program this. As I said, it sounds to me that it would be possible, but what do you think? Think it would be a worthwhile idea?

Thanks for the input, everyone. I hope that I explained everything pretty precisely...I know sometimes my thoughts become quite jumbled.

Thanks in advance for any responses.

Take care.


----------



## IMM (Feb 1, 2002)

It's certainly possible.

The more normal cheap hardware solution would be to use the parallel port (making it a bit mask type arrangement) rather than a serial port.
What you need to do will depend on the hardware (is it polled or does it somehow trigger)

The thing to watch for, is that this is easier under dos than windows - windows virtualizes the hardware and makes such things miserable. There are a fair number of suitable driver routines out there tho' - check the hobby electronics boards and sites.

Hard to say much more w/o some real details (os and hardware)


----------



## jiml8 (Jul 3, 2005)

I wrote that program about 17 years ago.

I wrote it to run as multiple processes on the Amiga, and I wrote it in C. I did it in partnership with the firm that built and marketed the security hardware. This company commonly sold packages based upon PDP-11 or, in the case of larger installations, VAX. However I showed them it could be done quite well with the Amiga microcomputer.

They were impressed and tried to market it, but the marketplace was far more willing to accept Digital Equipment Corp hardware than Commodore hardware.

My package monitored door and window switches, and also monitored swipe card readers. When it posted an alarm, it gave an audible warning (human voice..."there is an illegal entry at this location", and/or tone, and a display that showed a building map with the affected area highlighted. It kept logs of legal entry and exits, and by whom.

It was very cool. Too bad it didn't sell.


----------



## InterKnight (Oct 19, 2004)

Hello, IMM and jiml8.

Thanks for the replies. They are greatly appreciated.

jiml8: since you have experience with this type of thing, would you be able to give me some advise? I am only experienced with console programming with C++ (and some C). I'm currently trying to teach myself wxWidgets for Windows GUI programming. Unfortunately, I do not have much of a clue as to what I need to know to write programs for hardware communications (if that is what is entailed, which I am pretty sure it is in this case).

What would you advise?

Thanks greatly for the input, IMM. I will post on the mentioned forums and see what I can find.

Thanks to both of you for the help. I have five or six months (I am pretty certain) before this would be due, so hopefully that will be enough time for me to learn what I need to learn. All in all I'm looking forward to it.

Thanks again and take care.


----------



## IMM (Feb 1, 2002)

Can you tell me the hardware in question ? (what is interfacing to the //port or serial port - the rest does'nt matter as much). If so then, like jiml8, I've probably been there and can give more specific advice. I see from your last post you have windows in mind


----------



## InterKnight (Oct 19, 2004)

Hello, IMM.

As far as hardware is concerned, I am not exactly sure what will be needed. My professor said that I could buy wireless/magnetic switches which I could use to work as the security portion which will detect a change on something such as a window or a door.

I have practically no experience with this, so I am assuming I would need some kind of wireless card (I am not quite sure if/how COM ports would intercept wireless signals, if there s some device that could be plugged into them to do so.) to carry out this task.

I am currently taking a beginning class on PC hardware support, so my knowledge about hardware s somewhat limited, but it is getting better by the day. Would I e correct (to some extent) in that I would need some sort of wireless card to intercept the signals fro the switches?

I hope that I am giving enough information, but if not please let me know. I am going to research the wireless/magnetic switches so I can see what exactly they are, pricing and such. Once I get that figured out, I will post back.

I really appreciate all of your help as this will be the first real-world C/C++ application that I will program. I am really looking forward to the experience, even if t may be a really frustrating one.

Thanks again.

Take care.


----------



## InterKnight (Oct 19, 2004)

Here is something along the lines of the wireless/megnetic sensor/switch. However, this seems to be an extra mplementaton for pre-installed security systems. I believe, though, that this is along the lines of the type of equipment that I would need. Gong to keep researchng this.

Motorola Wireless Door/Window Sensors:
http://www.radioshack.com/product/index.jsp?productId=2104326&cp=&pg=2&kw=wireless&parentPage=search


----------



## jiml8 (Jul 3, 2005)

The switches and sensors are easy; it is the interface you have to worry about. You need some means of translating the switch open/close to signals that the computer can read. There are many choices here; google on "data acquisition modules" to get an idea of what is out there. You might also want to look at the Echelon product line - might be some ideas there.


----------

