| ||||||||||||
| ||||||||||||
Description: Delcom Node JS - A simple NodeJS example using the node-hid package to read and write the Delcom USB Device. Works with all Delcom HID device (Generations 2,3+). Tested on Ubuntu and Raspberry Pi Note(4)
Linux Kernel Issue in v4.8+ Verion 1.0 Download Delcom.js
// Sample test code
delcom = require("./Delcom.js"); console.log("Starting....."); delcom.GetInfo(1); delcom.LedCtrl(delcom.GreenLED, delcom.ModeOff); delcom.LedCtrl(delcom.RedLED, delcom.ModeOff); delcom.LedCtrl(delcom.YellowLED, delcom.ModeOff); delcom.LedCtrl(delcom.YellowLED, delcom.ModeFlash); //delcom.WrPorts(0, 0); var ports = delcom.RdPorts(); console.log("P0="+ports[0], " P1="+ports[1], " P2="+ports[2]); console.log("All done....."); Works with all G2 and newer products.
|