A buddy of mine and I would sometimes kick back and watch the TV at work. Unfortunately, we never knew someone was coming down the hall until they popped into the switchroom. We found an old motion sensor that had been a part of the security system at one time and when activated, it would apply 15-18V DC to a set of leads. We ran a cable from the sensor over to a PC that hadn't been used in years. I aquired a relay which had been controlling the AC compressor in someone's vehicle who also worked there (they didn't start having AC problems until the next spring...that they noticed). We wired the relay up to the sensor and the switched-contacts the the comm port (TX->RX) of the PC. I hammered out a really short and inefficient perl script that constantly wrote data to the comm port and when the motion sensor was activated, the relay looped my TX and RX on the PC, perl began receiving data and played a nice warning tone which was plenty of notice to "look busy". We also put Mahjonng on that machine and it became our gaming system for those slow days. I even caught the boss playing it a couple of times and I knew at that time, the machines future was secured. I love Perl.
-Jasper

In reply to Security Alarm by Jasper66

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.