# board-io

> Provides a standard interface to boards capable of IO (e.g. Arduinos, Maestros, Raspberry Pis, etc) and their firmware

Latest version **3.0.5** (published 2016-01-18) · BSD license · 0 weekly downloads

## Install

```sh
npm install board-io
pnpm add board-io
yarn add board-io
bun add board-io
```

## 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 | 3.0.5 |
| Published | 2016-01-18 |
| First published | 2014-12-03 |
| Weekly downloads | 0 |
| License | BSD |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 23 |
| Author | Alex Potsides |
| Maintainers | achingbrain |
| Keywords | node, firmata, servo, ssc, johnny-five |

## Links

- npm: https://www.npmjs.com/package/board-io
- Repository: https://github.com/achingbrain/board-io
- Homepage: https://github.com/achingbrain/board-io#readme
- Issues: https://github.com/achingbrain/board-io/issues
- npm.io page: https://npm.io/package/board-io

## Dependencies (1)

- [check-types](https://npm.io/package/check-types.md) ^1.2

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 3.0.5 (latest) — 2016-01-18
- 3.0.4 — 2015-05-12
- 3.0.3 — 2015-05-12
- 3.0.2 — 2015-04-16
- 3.0.1 — 2015-02-17
- 3.0.0 — 2014-12-03

## README

# board-io

An extendable implementation of Johnny Five's [IO Plugins](https://github.com/rwaldron/johnny-five/wiki/IO-Plugins).

Implements all required and optional methods, along with the required constants - `MODE`, `HIGH`, `LOW`, etc.

You should configure the relevant pins of your board in your constructor, then emit the ready event.

E.g.:

```javascript
var util = require('util'),
  BoardIO = require('board-io');

MyIO = function(path, callback) {
  // call super constructor
  BoardIO.call(this);

  // .. configure pins
  this._pins.push(..);
  
  // wait for an async method or use proccess.nextTick to 
  // signal events
  process.nextTick(function() {
    // connect to hardware and emit "connect" event
    this.emit("connect");
  
    // all done, emit ready event
    this.emit("ready");
  
    // finally call the passed callback
    callback();
  }.bind(this));
}
util.inherits(IO, BoardIO);
```

Finally implement any of the IO Plugin methods of your choosing:

```javascript
// implement digitalWrite
MyIO.prototype.digitalWrite = function(pin, value) {
  ..
};
```

## Logging

By default BoardIO will print a message when every non-implemented method is invoked.  To prevent this, set the `quiet` property of the super constructor args to true:

```javascript
MyIO = function(path, callback) {
  // call super constructor
  BoardIO.call(this, {
    ..
    quiet: true
  });

  ..
}
util.inherits(IO, BoardIO);
```

## Changelog

### 3.1.0

1. Adds new i2cXXX methods
2. Prints deprecation warning when calling old sendI2CXXX methods

### 3.0.0 - Initial release

1. All Firmata methods stubbed out

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