Serial Port API for Deno with zero third-party native dependencies.
Platform | getPorts |
open |
---|---|---|
Windows | ✅ | ✅ |
macOS | ❌ | ❌ |
Linux | ❌ | ❌ |
Run the following to list all available ports:
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.
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();
Apache-2.0. Check LICENSE for more information.
Copyright © 2022-2023 DjDeveloperr