npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@redplc/node-red-gpio

v2.0.1

Published

Node-RED nodes for Raspberry Pi gpio using with redPlc nodes

Downloads

157

Readme

@redplc/node-red-gpio

platform platform platform

Node-RED nodes for Raspberry Pi GPIO using with redPlc nodes.

Installation

Install with Node-Red Palette Manager or npm command:

cd ~/.node-red
npm install @redplc/node-red-gpio

Report any issues here with name @redplc/node-red-gpio.

Detail

  • This node uses the gpio character devices interface (V2) from the Linux operating system
  • The interface to hardware is implemented in C++ as add-on module
  • This library works on Raspberry Pi with 32bit or 64bit OS
  • Works on Raspberry Pi 3, 4, 5
  • Not yet tested on the Raspberry Pi 2

Nodes

  • gpio-in: Reads GPIO inputs and store in boolean array.
  • gpio-out: Sets GPIO outputs from boolean array.

Usage

  • Install redPlc nodes.
  • Use redPlc s-inject node for trigger update.
  • Connect to first output on s-inject node.
  • Daisy chain nodes in series.
  • For logical operations use redPlc nodes.
  • Data is exchanged with global context variable arrays.
  • Array index is equal gpio number for easy handling.
  • Select different gpio pins for input and output.
  • For open inputs select pull down/up resistors.
  • Check with raspi-config for alternate functions on GPIO.

Array Index Mapping

|Index|Funct.|Pin|Pin|Funct.|Index| |:--|:---- |:-:|:-:|:-----|:--| ||3V3|1|2|5V|| |2|GPIO02|3|4|5V|| |3|GPIO03|5|6|GND|| |4|GPIO04|7|8|GPIO14|14| ||GND|9|10|GPIO15|15| |17|GPIO17|11|12|GPIO18|18| |27|GPIO27|13|14|GND|| |22|GPIO22|15|16|GPIO23|23| ||3V3|17|18|GPIO24|24| |10|GPIO10|19|20|GND|| |9|GPIO09|21|22|GPIO25|25| |11|GPIO11|23|24|GPIO08|8| ||GND|25|26|GPIO07|7| |||27|28||| |5|GPIO05|29|30|GND|| |6|GPIO06|31|32|GPIO12|12| |13|GPIO13|33|34|GND|| |19|GPIO19|35|36|GPIO16|15| |26|GPIO26|37|38|GPIO20|20| ||GND|39|40|GPIO21|21|

Example

The example shows the logic behind redPlc. Please install this and @redplc/node-red-redplc Node. Connect switches to GPIO21, GPIO20 and GPIO16 with common to ground. LEDs with series resistors can be connected to the outputs GPIO12, GPIO13, GPIO19 and GPIO26. Please note the maximum output current of the GPIO pins.