hxnodejs-serialport

Externs for the serialport NPM module
https://github.com/tong/hxnodejs-serialport

To install, run:

haxelib install hxnodejs-serialport 2.0.0 

See using Haxelib in Haxelib documentation for more information.

README.md

Haxe Serialport NPM

Haxe/Nodejs type definitions for the serialport npm module.

Node-Serialport provides a stream interface for the low-level serial port code necessary to control Arduino chipsets, X10 interfaces, Zigbee radios, highway signs, lcd screens, cash drawers, motor controllers, sensor packages, fork lifts, modems, drones, CNC machines, plotters, vending machines, ccTalk coin accecptors, SMS Gateways, RFID scanners and much more. If you have a hardware device with a UART we can speak to it. The physical world is your oyster with this goodie.

test Haxelib Version

Install

haxelib install hxnodejs-serialport
npm install serialport

Version 2.x targets serialport v13 (Node.js >= 20). All classes, including parsers, are required from the serialport package.

Usage

import js.npm.serialport.SerialPort;
import js.npm.serialport.parser.ReadlineParser;

var port = new SerialPort({path: '/dev/ttyACM0', baudRate: B9600});
var parser = port.pipe(new ReadlineParser({delimiter: '\n'}));
parser.on('data', (line:String) -> trace(line));
Contributors
tong
Version
2.0.0
Published
3 weeks ago
Dependencies
License
MIT

All libraries are free

Every month, more than a thousand developers use Haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on GitHub!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on GitHub

⌂