# uscp

> Ultra Sonic Communication Protocol

Latest version **1.0.0** (published 2015-09-20) · ISC license · 0 weekly downloads

## Install

```sh
npm install uscp
pnpm add uscp
yarn add uscp
bun add uscp
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2015-09-20 |
| First published | 2015-09-20 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | korynunn |

## Links

- npm: https://www.npmjs.com/package/uscp
- Repository: https://github.com/KoryNunn/uscp
- Issues: https://github.com/KoryNunn/uscp/issues
- npm.io page: https://npm.io/package/uscp

## Recent versions

- 1.0.0 (latest) — 2015-09-20

## README

# USCP

Ultra Sonic Communication Protocol

## Stability

Lol..

## What

Uses ultrasonic frequencies to send 8 bit data to devices pretty close to you.

## How

USCP encodes each Byte of data into each tone. A tone is transmitted for a short period of time before moving on to the next byte.

Each bit column data in a byte has it's own frequency, for example

(not the actual freqs used)

```
abcdefgh
10100101

```

a -> 19000
b -> 19000 + 100hz
c -> 19000 + 200hz
d -> 19000 + 300hz
etc..

[This makes pretty things on a spectrogram.](https://twitter.com/KoryNunn/status/645578328359866373)

The decoder watches the input as fast as possible, listening to all frequency bins that register above a threshold.

It makes bytes from the tone, and then calls back with a message.

## Usage

The example is a great place to start

[example](./example)

```
var modem = require('../modem');

// Start listening
modem.demodulate(function(error, message){
    // We got a message! :D

    // Currently it  can't error..
});

modem.modulate('Hello world!');

```

You can encode all characters in the range from 1 to 255, which is probably enough.

I may eventually supporting packet sizes up to 64bit, if it works..

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