# pi-pir-sensor

> PIR sensor library for the Raspberry Pi

Latest version **0.0.3** (published 2015-06-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install pi-pir-sensor
pnpm add pi-pir-sensor
yarn add pi-pir-sensor
bun add pi-pir-sensor
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2015-06-25 |
| First published | 2015-06-25 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | separate (@types/pi-pir-sensor) |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Pedro Miranda |
| Maintainers | opedromiranda |

## Links

- npm: https://www.npmjs.com/package/pi-pir-sensor
- Repository: https://github.com/opedromiranda/pi-pir-sensor
- Issues: https://github.com/opedromiranda/pi-pir-sensor/issues
- npm.io page: https://npm.io/package/pi-pir-sensor

## Dependencies (2)

- [o-mapper](https://npm.io/package/o-mapper.md) ^0.1.2
- [rpi-gpio](https://npm.io/package/rpi-gpio.md) ^0.5.2

## Recent versions

- 0.0.3 (latest) — 2015-06-25
- 0.0.1 — 2015-06-25

## README

## PIR sensor library for the Raspberry Pi

[![Build Status](https://travis-ci.org/opedromiranda/pi-pir-sensor.svg)](https://travis-ci.org/opedromiranda/pi-pir-sensor)

### Usage
```javascript
var Sensor = require('pi-pir-sensor');
var sensor = new Sensor({
    // pin number must be specified
    pin: 12,

    // loop time to check PIR sensor, defaults to 1.5 seconds
    loop: 1500
});

sensor.on('movement', function () {
    // who's there?
});

sensor.start();
```

### Methods
------------------
#### start()
Starts reading sensor

#### stop()
Stops reading sensor





### Properties
------------------
#### pin
Pin number

#### loop
Loop interval

#### lastMovement
Date of last registered movement

---
_Source: https://npm.io/package/pi-pir-sensor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
