From a781834bc791901c499eea82582a90de0fbd0c5e Mon Sep 17 00:00:00 2001 From: liamcottle Date: Tue, 8 Apr 2025 14:54:10 +1200 Subject: [PATCH] update readme example --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1a1bbc2..b7f60d2 100644 --- a/README.md +++ b/README.md @@ -24,11 +24,13 @@ npm install @liamcottle/meshcore.js ## Simple Example ``` -import { TCPConnection } from "@liamcottle/meshcore.js"; +import { TCPConnection, NodeJSSerialConnection } from "@liamcottle/meshcore.js"; -// create tcp connection -// tcp connections are supported by "Heltec_v3_companion_radio_wifi" -const connection = new TCPConnection("10.1.0.226", 5000); +// serial connection are supported by "companion_radio_usb" firmware +const connection = new NodeJSSerialConnection("/dev/cu.usbmodem14401"); + +// tcp connections are supported by "companion_radio_wifi" firmware +// const connection = new TCPConnection("10.1.0.226", 5000); // wait until connected connection.on("connected", async () => {