How to Interface Arduino with Zilog ePIR Motion Detector.

@Anurag
I'm the one who wrote the ePIR library. Thanks for your interest. First, I only have an Arduino MEGA, so I wrote the library to use one of the additional serial ports Serial1(pins 19-18), Serial2(pins 17-16) or Serial3(pins 15-14). The first Serial port, pins 0 & 1, are used to by the arduino to communicate with your computer via the arduino's Serial Monitor. You should NOT use pins 0 and 1 to communicate with the ePIR. It's good practice to not use those pins because they're used to upload your sketch and recieve data from the arduino. You could loose the ability to upload sketches if you dont know what you're doing. If you don't have a MEGA the library will have to be changed to use the SoftwareSerial library or the NewSoftSerial library. I have never used either of them (Because I have a MEGA). I'm not experienced enough to port a library to other boards yet. However, if one of the more talented members of this forum (YOU KNOW WHO YOU ARE) would like to coach me a little or point me in the right direction, help in debugging, etc., then I'll give it a try. I love to learn. Anyway, if you have a MEGA, use port 1, 2 or 3 (pins 19-18, 17-16, 15-14) for RX and TX on the arduino. Laod the ePIR example sketch , select the correct serial port with EPIR.Init() function which needs to be called first [before using any other EPIR.function() call] to initialize the device. The device needs a little time to settle before it will detect movement (less than a minute). One more thing, the MD pin of the ePIR is normally HIGH and is pulled LOW when motion is detected. I hope this helps. If you have more questions post them here and I'll answer if I can.

Thanks,
DigitalJohnson