Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-red-contrib-i2c

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-red-contrib-i2c

A Node-RED node to talk to an I2C port

  • 0.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
150
decreased by-24.62%
Maintainers
1
Weekly downloads
 
Created
Source

node-red-contrib-i2c

This set of node-red nodes communicate with the Raspberry Pi I2C driver and uses the node-I2C package. Run the following command in the root directory of your Node-RED install, usually this is ~/.node-red .

npm install node-red-contrib-i2c

Usage

Provides three nodes - one to scan connected device, one to receive messages, and one to send.

Configuration

When you start using on of the below nodes you need first to configurate the I2C Device. The Raspberry PI uses an special device name to connect to the I2C controller. Depending on the Raspberry PI version it can be one of the below values; for the RPi Rev 1 it /dev/i2c-0 and all Others it will be /dev/i2c-1 (=default). In the config screen you can also set the default I2C-address to where the node sends the Messages and request's to.

Scan I2C

This will scan the I2C bus for connected devices and has one in point to trigger the scan process and 2 out put points:

  • The first output point give a list of all found decives in msg.payload and will be triggered once.
  • The second output point will be triggered for every found device the address will be in msg.payload

Input I2C

This node will request data from a given device. The address and command can both be set in the dialog screen or dynamicly with msg.address and msg.command. This node outputs the result as a buffer in msg.payload and places the address in msg.address and command in msg.command.

Output I2C

This node will send a given String/array/buffer to a given device. The address and command can both be set in the dialog screen or dynamicly with msg.address and msg.command. The payload can be dynamicly or staticly set.

Keywords

FAQs

Package last updated on 04 Aug 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc