Skip to content

Commit

Permalink
docs: cleanup the readmes (#2430)
Browse files Browse the repository at this point in the history
  • Loading branch information
reconbot authored Feb 14, 2022
1 parent 6b0e85f commit 1eddb07
Show file tree
Hide file tree
Showing 17 changed files with 27 additions and 116 deletions.
37 changes: 1 addition & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,43 +13,8 @@ Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your roboti
## Quick Links

- [**Guides**](https://serialport.io/docs/)
- [**API Docs**](https://serialport.io/docs/api-serialport)
- [The `serialport` package api docs](https://serialport.io/docs/api-serialport) (most people start here)

### Serialport

- [`serialport`](https://serialport.io/docs/api-serialport) Chances are you're looking for the `serialport` package which provides a good set of defaults for most projects. However it is quite easy to mix and match the parts of serialport you need.

### Bindings

The code for bindings can be found here https://github.com/serialport/bindings-cpp

The Bindings provide a low level interface to work with your serialport. It is possible to use them alone but it's usually easier to use them with an interface.

- [`@serialport/bindings`](https://serialport.io/docs/api-bindings) bindings for Linux, Mac and Windows
- [`@serialport/binding-abstract`](https://serialport.io/docs/api-bindings-abstract) as an abstract class to use if you're making your own bindings
- [`@serialport/binding-mock`](https://serialport.io/docs/api-binding-mock) for a mock binding package for testing

### Interfaces

Interfaces take a binding object and provide a different API on top of it. Currently we only ship a Node Stream Interface.

- [`@serialport/stream`](https://serialport.io/docs/api-stream) our traditional Node.js Stream interface

### Parsers

Parsers are used to take raw binary data and transform them into usable messages. This may include tasks such as converting the data to text, emitting useful chunks of data when they have been fully received, or even validating protocols.

Parsers are traditionally Transform streams, but Duplex streams and other non stream interfaces are acceptable.

- [@serialport/parser-byte-length](https://serialport.io/docs/api-parser-byte-length)
- [@serialport/parser-cctalk](https://serialport.io/docs/api-parser-cctalk)
- [@serialport/parser-delimiter](https://serialport.io/docs/api-parser-delimiter)
- [@serialport/parser-readline](https://serialport.io/docs/api-parser-readline)
- [@serialport/parser-ready](https://serialport.io/docs/api-parser-ready)
- [@serialport/parser-regex](https://serialport.io/docs/api-parser-regex)
- [@serialport/parser-slip-encoder](https://serialport.io/docs/api-parser-slip-encoder)

## Developing

### Developing node serialport projects
Expand All @@ -61,7 +26,7 @@ Parsers are traditionally Transform streams, but Duplex streams and other non st

### Developing Docs

See <https://github.com/serialport/website>
See https://github.com/serialport/website

## License

Expand Down
2 changes: 1 addition & 1 deletion packages/binding-abstract/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @serialport/BindingAbstract
# @serialport/binding-abstract

The bindings package has been renamed [`@serialport/bindings-interface`](https://www.npmjs.com/package/@serialport/bindings-interface) and it's code has been moved out of the monorepo to it's [own repository](https://github.com/serialport/bindings-interface/).
2 changes: 1 addition & 1 deletion packages/bindings/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# @serialport/Bindings
# @serialport/bindings

The bindings package has been renamed [`@serialport/bindings-cpp`](https://www.npmjs.com/package/@serialport/bindings-cpp) and it's code has been moved out of the monorepo to it's [own repository](https://github.com/serialport/bindings-cpp/).
37 changes: 2 additions & 35 deletions packages/list/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
## SerialPort List
# @serialport/list

```bash
$ npx @serialport/list [options]
# or
$ npm install -g @serialport/list
$ serialport-list [options]
```

The package `@serialport/list` will install the `serialport-list` cli tool which lists all available serial ports in different formats.

```bash
$ serialport-list -h

Usage: serialport-list [options]

List available serial ports

Options:

-h, --help output usage information
-V, --version output the version number
-f, --format <type> Format the output as text, json, or jsonline. default: text


$ serialport-list
/dev/tty.Bluetooth-Incoming-Port
/dev/tty.usbmodem1421 Arduino (www.arduino.cc)

$ serialport-list -f json
[{"path":"/dev/tty.Bluetooth-Incoming-Port"},{"path":"/dev/tty.usbmodem1421","manufacturer":"Arduino (www.arduino.cc)","serialNumber":"752303138333518011C1","locationId":"14200000","vendorId":"2341","productId":"0043"}]

$ serialport-list -f jsonline
{"path":"/dev/tty.Bluetooth-Incoming-Port"}
{"path":"/dev/tty.usbmodem1421","manufacturer":"Arduino (www.arduino.cc)","serialNumber":"752303138333518011C1","locationId":"14200000","vendorId":"2341","productId":"0043"}
```
See our api docs https://serialport.io/docs/bin-list
2 changes: 2 additions & 0 deletions packages/parser-byte-length/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @serialport/parser-byte-length

See our api docs https://serialport.io/docs/api-parser-byte-length
2 changes: 1 addition & 1 deletion packages/parser-cctalk/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# CCTalk Parser
# @serialport/parser-cctalk

See our api docs https://serialport.io/docs/api-parser-cctalk
2 changes: 2 additions & 0 deletions packages/parser-delimiter/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @serialport/parser-delimiter

See our api docs https://serialport.io/docs/api-parser-delimiter
2 changes: 2 additions & 0 deletions packages/parser-inter-byte-timeout/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @serialport/parser-inter-byte-timeout

See our api docs https://serialport.io/docs/api-parser-inter-byte-timeout
2 changes: 1 addition & 1 deletion packages/parser-packet-length/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Parser Packet Length
# @serialport/parser-packet-length

The documentation at https://serialport.io/docs/api-parser-packet-length
2 changes: 2 additions & 0 deletions packages/parser-readline/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @serialport/parser-readline

See our api docs See our api docs https://serialport.io/docs/api-parser-readline
2 changes: 2 additions & 0 deletions packages/parser-ready/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @serialport/parser-ready

See our api docs https://serialport.io/docs/api-parser-ready
2 changes: 2 additions & 0 deletions packages/parser-regex/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @serialport/parser-regex

See our api docs https://serialport.io/docs/api-parser-regex
2 changes: 2 additions & 0 deletions packages/parser-slip-encoder/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @serialport/parser-slip-encoder

See our api docs https://serialport.io/docs/api-parser-slip-encoder
2 changes: 2 additions & 0 deletions packages/parser-spacepacket/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# @serialport/parser-spacepacket

See our api docs https://serialport.io/docs/api-parser-spacepacket
41 changes: 2 additions & 39 deletions packages/repl/README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,3 @@
## SerialPort Repl
```bash
$ npx @serialport/repl <port>
# or
$ npm install -g @serialport/repl
$ serialport-repl <port>
```
# @serialport/repl

The package `@serialport/repl` will install the `serialport-repl` cli tool which provides a nodejs repl for working with serialport. This is valuable when debugging.

You can make use of the `serialport-repl` command with;
```bash
$ serialport-repl # to auto detect an arduino
$ serialport-repl /dev/tty.usbmodem1421 # to connect to a specific port
```

It will load a serialport object with debugging turned on.
```bash
$ serialport-repl
serialport:binding:auto-detect loading DarwinBinding +0ms
port = SerialPort("/dev/tty.usbmodem1421", { autoOpen: false })
globals { SerialPort, portName, port }
> SerialPort.list()
serialport:main .list +6s
[ { comName: '/dev/tty.usbmodem1421',
manufacturer: 'Arduino (www.arduino.cc)',
serialNumber: '752303138333518011C1',
pnpId: undefined,
locationId: '14200000',
vendorId: '2341',
productId: '0043' } ]
> port.write('Calling all Autobots!')
true
> port.read()
serialport:main _read queueing _read for after open +1m
null
> port.open()
serialport:main opening path: /dev/tty.usbmodem1421 +30s
serialport:bindings open +1ms
```
See the documentation at https://serialport.io/docs/bin-repl
2 changes: 1 addition & 1 deletion packages/serialport/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SerialPort
# serialport

Access serial ports with JavaScript. Linux, OSX and Windows. Welcome your robotic JavaScript overlords. Better yet, program them!

Expand Down
2 changes: 1 addition & 1 deletion packages/terminal/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SerialPort Terminal
# @serialport/terminal

See the documentation at https://serialport.io/docs/bin-terminal

0 comments on commit 1eddb07

Please sign in to comment.