node-red-contrib-tca9554

The basic Node-RED node for GPIO Expander TCA9554 connected to boards like the Raspberry Pi

Usage no npm install needed!

<script type="module">
  import nodeRedContribTca9554 from 'https://cdn.skypack.dev/node-red-contrib-tca9554';
</script>

README

node-red-contrib-tca9554

Node-Red node for Raspberry Pi with TCA9554 GPIO expander connected via I2C.
Works with Raspberry Pi OS and Advantech Industrial Raspberry Pi 4 HAT Gateway Kit: UNO-220.
Warning: currently this nodes didn't work properly with system image on SD included in the Advantech Kit.

Node Features

  • Each gpio pin (0-7) can be set as input or output
  • Input can read actual state
  • Output can activate high or low state

Install

Install with Node-Red Palette Manager or run npm command:

cd ~/.node-red
npm install node-red-contrib-tca9554

Usage

run raspi-config to enable I2C
in nodes configuration choose correct pin number, I2C address and Bus
for input inject msg.payload = true/1 for high state and false/0 for low state
for output inject any value to trigger reading

Usage

Tested on

  • Raspberry Pi 4, with Raspberry Pi OS on Host.
  • Raspberry Pi 4, on Docker contaier.

With docker you need to add folowing line to docker run command:

docker run ... --device /dev/i2c-1 --user=root --privileged ...