Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/djdeveloperr/deno_serial
Serialport API for Deno.
https://github.com/djdeveloperr/deno_serial
deno ffi serialport typescript winapi
Last synced: 3 months ago
JSON representation
Serialport API for Deno.
- Host: GitHub
- URL: https://github.com/djdeveloperr/deno_serial
- Owner: DjDeveloperr
- License: apache-2.0
- Created: 2022-01-04T14:25:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-03T07:18:16.000Z (over 1 year ago)
- Last Synced: 2024-10-18T13:32:58.451Z (3 months ago)
- Topics: deno, ffi, serialport, typescript, winapi
- Language: TypeScript
- Homepage: https://deno.land/x/serialport
- Size: 46.9 KB
- Stars: 20
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deno SerialPort
[![Tags](https://img.shields.io/github/release/DjDeveloperr/deno_serial)](https://github.com/DjDeveloperr/deno_serial/releases)
[![License](https://img.shields.io/github/license/DjDeveloperr/deno_serial)](https://github.com/DjDeveloperr/deno_serial/blob/master/LICENSE)
[![Sponsor](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86)](https://github.com/sponsors/DjDeveloperr)Serial Port API for Deno with zero third-party native dependencies.
| Platform | `getPorts` | `open` |
| -------- | ---------- | ------ |
| Windows | ✅ | ✅ |
| macOS | ❌ | ❌ |
| Linux | ❌ | ❌ |## Try out
Run the following to list all available ports:
```sh
deno run --unstable --allow-ffi -r https://raw.githubusercontent.com/DjDeveloperr/deno_serial/main/examples/print_ports.ts
```NOTE: Not yet published to deno.land/x as not all platforms are supported yet.
## Usage
```ts
import { getPorts, open } from "https://deno.land/x/[email protected]/mod.ts";const ports = getPorts();
console.log("Ports:", ports);const port = open({ name: ports[0].name, baudRate: 9600 });
// ...
port.close();
```## License
Apache-2.0. Check [LICENSE](./LICENSE) for more information.
Copyright © 2022-2023 DjDeveloperr