# hc-sr04

> Raspberry Pi Node.js library for hc-sr04 ultrasonics

Latest version **0.0.1** (published 2022-07-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install hc-sr04
pnpm add hc-sr04
yarn add hc-sr04
bun add hc-sr04
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-07-12 |
| First published | 2022-07-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joey Andres |
| Maintainers | whitewood-robotics-solutions |

## Links

- npm: https://www.npmjs.com/package/hc-sr04
- Repository: https://github.com/Whitewood-Robotics-Solutions/hc-sr04
- Homepage: https://github.com/Whitewood-Robotics-Solutions/hc-sr04#readme
- Issues: https://github.com/Whitewood-Robotics-Solutions/hc-sr04/issues
- npm.io page: https://npm.io/package/hc-sr04

## Dependencies (1)

- [onoff](https://npm.io/package/onoff.md) ^6.0.3

## Recent versions

- 0.0.1 (latest) — 2022-07-12

## README

# hc-sr04
Raspberry Pi Node.js library for hc-sr04

## Basic Usage
The following is a basic usage, using pin 27 for trigger, and pin 26 as echo.

```ts
import { HCSR04 } from './HCSR04';

export { HCSR04 } from './HCSR04';

// eslint-disable-next-line no-constant-condition
while (true) {
  const ultrasonic = new HCSR04(27, 26);
  console.log('Distance: ' + ultrasonic.distance());
}
```

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