1.0.26 • Published 2 years ago
node-red-contrib-iiot-rpi-gpio v1.0.26
node-red-contrib-iiot-rpi-gpio
A Node-Red node for Raspberry Pi gpio
Installation
Install with Node-Red Palette Manager or npm command:
cd ~/.node-red
npm install node-red-contrib-iiot-rpi-gpio
Nodes
- gpio-in: Reads GPIO input.
- gpio-out: Sets GPIO output.
- gpio-pwm: Generate pwm on GPIO output.
- gpio-cnt: Counts GPIO input pulse.
- gpio-enc: Counts rotary encoder pulse.
- gpio-kbd: Reads 4x4 keypad.
Usage
- This node works on Raspberry Pi with 32bit or 64bit OS.
- No additional library needed.
- For open inputs, select pull down/up resistors.
- Max. GPIO input voltage is +3.3V.
- Max. GPIO output current is 16mA.
- Check with raspi-config for alternate functions on GPIO.
- For more accurate pwm and servo use PCA9685 node.
Connecting KY-040 rotary encoder
Connecting 4x4 keypad
GPIO Mapping
Alt. Funct. | Funct. | Pin | Pin | Funct. | Alt. Funct. |
---|---|---|---|---|---|
3V3 | 1 | 2 | 5V | ||
I2C1 SDA | GPIO02 | 3 | 4 | 5V | |
I2C1 SCL | GPIO03 | 5 | 6 | GND | |
GPIO04 | 7 | 8 | GPIO14 | UART TX | |
GND | 9 | 10 | GPIO15 | UART RX | |
GPIO17 | 11 | 12 | GPIO18 | ||
GPIO27 | 13 | 14 | GND | ||
GPIO22 | 15 | 16 | GPIO23 | ||
3V3 | 17 | 18 | GPIO24 | ||
SPI0 MOSI | GPIO10 | 19 | 20 | GND | |
SPI0 MISO | GPIO09 | 21 | 22 | GPIO25 | |
SPI0 SCLK | GPIO11 | 23 | 24 | GPIO08 | SPI0 CS0 |
GND | 25 | 26 | GPIO07 | SPI0 CS1 | |
-- | 27 | 28 | -- | ||
GPIO05 | 29 | 30 | GND | ||
GPIO06 | 31 | 32 | GPIO12 | ||
GPIO13 | 33 | 34 | GND | ||
SPI1 MISO | GPIO19 | 35 | 36 | GPIO16 | SPI1 CS0 |
GPIO26 | 37 | 38 | GPIO20 | SPI1 MOSI | |
GND | 39 | 40 | GPIO21 | SPI1 MISO |