<commit_before># PIR-monitor for Raspberry Pi

Sample code for using a PIR-sensor with the Raspberry Pi.

# Hardware setup

The PIR-sensor we are using ([SEN-08630](http://littlebirdelectronics.com/products/pir-motion-sensor)) has 3 wires. Red wire is power (5 to 12V). Brown wire is GND. Black wire is open collector alarm. _N.B. Check your sensors data sheet before connecting it your Pi, incorrect wiring could cause damage to your hardware._

Connect your power and ground wires to the respective GPIO pins and your alarm wire to pin 4.

![Hardware setup](pir-setup.png)

# Software setup

This sample program is using the [bcm2835](http://www.airspayce.com/mikem/bcm2835/) C library to access the GPIO pins. First of all, download the library and install it on your Pi.

Finally, build and run the PIR-monitor sample program:

```
cd pir-monitor
make
sudo ./pir-monitor
```


# Contributors

* [<NAME>](https://github.com/neilang)
* [<NAME>](https://github.com/vly)
* [<NAME>](https://github.com/AlfredYang1986)<commit_msg>Updated the build instructions<commit_after># PIR-monitor for Raspberry Pi

Sample code for using a PIR-sensor with the Raspberry Pi.

# Hardware setup

The PIR-sensor we are using ([SEN-08630](http://littlebirdelectronics.com/products/pir-motion-sensor)) has 3 wires. Red wire is power (5 to 12V). Brown wire is GND. Black wire is open collector alarm. _N.B. Check your sensors data sheet before connecting it your Pi, incorrect wiring could cause damage to your hardware._

Connect your power and ground wires to the respective GPIO pins and your alarm wire to pin 4.

![Hardware setup](pir-setup.png)

# Software setup

This sample program is using the [bcm2835](http://www.airspayce.com/mikem/bcm2835/) C library to access the GPIO pins. First of all, download the library and install it on your Pi.

Finally, build and run the PIR-monitor sample program:

```
git clone <EMAIL>:neilang/pir-monitor.git
cd pir-monitor
make
sudo ./pir-monitor
```


# Contributors

* [<NAME>](https://github.com/neilang)
* [<NAME>](https://github.com/vly)
* [<NAME>](https://github.com/AlfredYang1986)
{'fraction_non_alphanumeric': 0.1049645390070922, 'fraction_numerical': 0.020803782505910164, 'mean_word_length': 4.316582914572864, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 6, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2572557', 'n_tokens_mistral': 717, 'n_tokens_neox': 640, 'n_words': 259}