-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README: more docs, clean up. Adds. AUTHORS.md
- Loading branch information
Showing
5 changed files
with
149 additions
and
677 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
Rick Waldron | ||
Julian Gautier | ||
Glen Arrowsmith | ||
Jeff Hoefs | ||
Olivier Louvignes | ||
Francis Gulotta | ||
Luis Montes | ||
Lars Toft Jacobsen | ||
Érico | ||
Jean-Philippe Côté | ||
Ernesto Laval | ||
Dustan Kasten | ||
Lars Gregori | ||
Andrey Bezugliy | ||
Donovan Buck | ||
Pravdomil | ||
jywarren | ||
Andrew Stewart | ||
Richard Rodd | ||
Dwayn Matthies | ||
Sarah GP | ||
achingbrain | ||
David Resseguie | ||
Nick Stewart | ||
the1337guy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ npm install serialport --save | |
|
||
## With A Transport Class | ||
|
||
Here's an example using the `Serialport` class: | ||
|
||
```js | ||
const Serialport = require("serialport"); | ||
const Firmata = require("firmata-io")(Serialport); | ||
|
@@ -49,17 +51,15 @@ Firmata.requestPort((error, port) => { | |
|
||
## With A Transport Instance | ||
|
||
Here's an example using a `Serialport` instance: | ||
|
||
```js | ||
const Serialport = require("serialport"); | ||
const Firmata = require("firmata-io").Firmata; | ||
|
||
Firmata.requestPort((error, port) => { | ||
if (error) { | ||
console.log(error); | ||
return; | ||
} | ||
|
||
Serialport.list().then(ports => { | ||
// Figure which port to use... | ||
const port = ports.find(port => port.manufacturer.startsWith("Arduino")); | ||
const transport = new Serialport(port.comName); | ||
const board = new Firmata(transport); | ||
|
||
|
@@ -69,3 +69,30 @@ Firmata.requestPort((error, port) => { | |
}); | ||
}); | ||
``` | ||
|
||
|
||
## License | ||
|
||
(The MIT License) | ||
|
||
Copyright (c) 2011-2015 Julian Gautier <[email protected]> | ||
Copyright (c) 2015-2018 The Firmata.js Authors (see AUTHORS.md) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
'Software'), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. | ||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY | ||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, | ||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE | ||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Oops, something went wrong.