Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

firmata

Package Overview
Dependencies
Maintainers
2
Versions
69
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

firmata - npm Package Compare versions

Comparing version
2.0.1
to
2.2.0
+1
-1
examples/adxl345.js

@@ -15,3 +15,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -18,0 +18,0 @@ board.on("ready", function() {

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ board.on("ready", () => {

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ board.on("close", () => {

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ board.on("ready", () => {

@@ -5,4 +5,4 @@ const SerialPort = require("serialport");

SerialPort.list((error, list) => {
const device = list.reduce((accum, item) => {
SerialPort.list().then(ports => {
const device = ports.reduce((accum, item) => {
if (item.manufacturer.indexOf("Arduino") === 0) {

@@ -21,3 +21,3 @@ return item;

const board = new five.Board({
io: new Firmata(device.comName)
io: new Firmata(device.path)
});

@@ -24,0 +24,0 @@

@@ -13,3 +13,3 @@ /**

}
const board = new Board(port.comName);
const board = new Board(port.path);

@@ -16,0 +16,0 @@ board.on("ready", () => {

@@ -15,3 +15,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);
// var board = new Board("/dev/cu.usbmodem1411");

@@ -18,0 +18,0 @@

@@ -8,3 +8,3 @@ const Board = require("../");

}
const board = new Board(port.comName);
const board = new Board(port.path);

@@ -11,0 +11,0 @@ board.on("ready", function() {

@@ -8,3 +8,3 @@ const Board = require("../");

}
const board = new Board(port.comName);
const board = new Board(port.path);

@@ -11,0 +11,0 @@ board.on("ready", () => {

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ board.on("ready", () => {

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ board.on("ready", () => {

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ board.on("ready", () => {

@@ -9,3 +9,3 @@ const Board = require("../");

var board = new Board(port.comName);
var board = new Board(port.path);

@@ -12,0 +12,0 @@ board.on("ready", function() {

@@ -8,3 +8,3 @@ const Board = require("../");

}
const board = new Board(port.comName);
const board = new Board(port.path);

@@ -11,0 +11,0 @@ board.on("ready", () => {

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ console.log(__filename);

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ console.log(__filename);

@@ -9,3 +9,3 @@ const Board = require("../");

const board = new Board(port.comName);
const board = new Board(port.path);

@@ -12,0 +12,0 @@ console.log(__filename);

{
"name": "firmata",
"description": "Firmata protocol implementation for programmatic interaction with Arduino and Arduino compatible development boards. Includes Serialport",
"version": "2.0.1",
"version": "2.2.0",
"author": "Julian Gautier",

@@ -14,4 +14,4 @@ "license": "MIT",

"dependencies": {
"firmata-io": "^2.0.0",
"serialport": "^7.1.3"
"firmata-io": "^2.2.0",
"serialport": "^8.0.5"
},

@@ -30,3 +30,4 @@ "scripts": {

},
"keywords": []
"keywords": [],
"gitHead": "723cdae1831406781c935ac44faec25f79bced51"
}
+25
-25

@@ -35,3 +35,3 @@ # Firmata.js

#### With a path string:
#### With a path string:

@@ -109,23 +109,23 @@ ```js

The `Firmata` constructor creates an instance that represents a physical board.
The `Firmata` constructor creates an instance that represents a physical board.
- `new Firmata(path[, options][, readyCallback])`
- `new Firmata(port[, options][, readyCallback])`
- `new Firmata(path[, options][, readyCallback])`
- `new Firmata(port[, options][, readyCallback])`
| Parameter | Type | Description | Default | Required |
|-----------|------- |------------ |--------- |----------|
| path | String | A system path or port name. | none | Yes\* |
| port | Transport | A Transport object. | none | Yes\* |
| [options] | object | Optional settings to used when constructing. | [See Below](#board-options) | No |
| [readyCallback] | function | Optional "ready" callback to call when connection to board is complete. | none | No |
| path | String | A system path or port name. | none | Yes\* |
| port | Transport | A Transport object. | none | Yes\* |
| [options] | object | Optional settings to used when constructing. | [See Below](#board-options) | No |
| [readyCallback] | function | Optional "ready" callback to call when connection to board is complete. | none | No |
\* _**Either**_ a **path** or a **port** are required.
- Notes:
- `new Firmata(path: string)`: instances can be constructed using only a system path of the serial port to open or name, for example:
- Notes:
- `new Firmata(path: string)`: instances can be constructed using only a system path of the serial port to open or name, for example:
+ `new Firmata("/dev/usb.whatever")`
+ `new Firmata("/dev/ttyACM0")`
+ `new Firmata("COM1")`
- `new Firmata(port: Transport)`: instances can be constructed using a "Transport" object, for example:
+ `new Firmata(new Serialport(...))`
- `new Firmata(port: Transport)`: instances can be constructed using a "Transport" object, for example:
+ `new Firmata(new Serialport(...))`
+ `new Firmata(new Etherport(...))`

@@ -137,9 +137,8 @@

|-----------|------- |------------ |--------- |----------|
| skipCapabilities | Boolean | Set to `true` to skip the `CAPABILITY_QUERY` | `true` | No |
| reportVersionTimeout | Number | Time in milliseconds to wait before timing out the initial request for the firmware version. | 5000 | No |
| samplingInterval | Number | Time in milliseconds of the sampling interval on the actual board. | 19 | No |
| serialport | Object | See: [Serialport:openOptions](https://github.com/EmergingTechnologyAdvisors/node-serialport#module_serialport--SerialPort..openOptions). These will be ignored if the first argument is a Transport object. | \* | No |
| skipCapabilities | Boolean | Set to `true` to skip the `CAPABILITY_QUERY` | `true` | No |
| reportVersionTimeout | Number | Time in milliseconds to wait before timing out the initial request for the firmware version. | 5000 | No |
| samplingInterval | Number | Time in milliseconds of the sampling interval on the actual board. | 19 | No |
| serialport | Object | See: [Serialport:openOptions](https://github.com/EmergingTechnologyAdvisors/node-serialport#module_serialport--SerialPort..openOptions). These will be ignored if the first argument is a Transport object. | \* | No |
\* Defaults are defined in `Serialport`.

@@ -149,2 +148,3 @@

## Firmata Instance

@@ -478,6 +478,6 @@

- `board.STEPPER.STEP_SIZE`
- `board.STEPPER.STEP_SIZE`
Available step sizes.
```js

@@ -490,6 +490,6 @@ {

- `board.STEPPER.DIRECTION`
- `board.STEPPER.DIRECTION`
Stepper directions.
```js

@@ -501,3 +501,3 @@ {

```
- `board.accelStepperConfig(options)`

@@ -522,7 +522,7 @@

```
**invertPins**
The invertPins value is a 5-bit number
bit 5 |bit 4 |bit 3 |bit 2 |bit 1

@@ -572,3 +572,3 @@ ----------------|----------------|----------------|----------------|----------------

- `board.multiStepperConfig(opts)`
Configure a multStepper group. multiStepper groups allow you to pass an array of targeted positions and have all the steppers move to their targets and arrive at the same time. Note that acceleration cannot be used when moving a multiStepper group.

@@ -575,0 +575,0 @@

@@ -5,3 +5,3 @@ // This test file is primarily for rounding out test coverage

const sandbox = sinon.sandbox.create();
const sandbox = sinon.createSandbox();

@@ -13,3 +13,3 @@ describe("com.*", () => {

port: {
comName: null
path: null
},

@@ -16,0 +16,0 @@ };

require("../common/bootstrap");
const sandbox = sinon.sandbox.create();
const sandbox = sinon.createSandbox();

@@ -5,0 +5,0 @@ describe("OneWire.crc8/OneWire.readDevices", () => {

Sorry, the diff of this file is too big to display