Socket
Socket
Sign inDemoInstall

devasys-i2c_debug

Package Overview
Dependencies
31
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    devasys-i2c_debug

Devasys USB I2C adapter driver for nodejs (using FFI)


Version published
Maintainers
1
Created

Readme

Source

Devasys Red Card I2C Driver For NodeJS

Installation

npm i devasys-i2c --save

Usage

import devasys = require("devasys-i2c_debug");

var device = new devasys.DevasysI2C();

// Get Dll Version
var dllVersion = device.GetDllVersion();
console.log('dllVersion :' + dllVersion);

// Open device
device.Open();

// WriteI2C
// first parameter - i2c address,
// second parameter - array of bytes to write
device.WriteI2C(0xF0, [0x10, 0xE0]);
device.WriteI2C(0xF0, [0x21]);

// ReadI2C
// first parameter - i2c address
// second parameter - number of bytes to read
// returns array of bytes with result

var result = device.ReadI2C(0xF0, 1);



FAQs

Last updated on 30 Aug 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc