Skip to main content

GPIO & Hardware Nodes

Hardware interface nodes for direct communication with GPIO pins, I2C, SPI, and serial devices.

GPIO & Hardware Nodes

Hardware interface nodes provide direct access to GPIO pins, I2C, SPI, 1-Wire, and serial communication. Perfect for building IoT devices and embedded systems with Raspberry Pi.

28 Nodes
5 Protocols
40 GPIO Pins

gpio-in

Read digital input from GPIO pins. Supports pull-up/pull-down resistors and edge detection.

Input Digital HIGH/LOW
Pull Up, down, or none
Edge Rising, falling, both
Debounce Configurable (50ms)

Configuration

{cfg.key} number GPIO pin number (BCM)
{cfg.key} string "up" | "down" | "none"
{cfg.key} string "rising" | "falling" | "both"
{cfg.key} number Milliseconds to debounce

Output Example

{node.details.output}
Use BCM pin numbering, not physical pin numbers. GPIO17 is physical pin 11.

gpio-out

Control digital output on GPIO pins. Set pins high or low, or toggle state.

Output HIGH, LOW, toggle
Initial Configurable state
Current 16mA per pin max
Voltage 3.3V logic level

Configuration

{cfg.key} number GPIO pin number (BCM)
{cfg.key} string "high" | "low"
{cfg.key} string "set" | "toggle"

Output Example

{node.details.output}
For loads > 16mA, use a transistor or relay. Never connect motors directly.

pwm

Popular

Generate PWM signals for LED dimming, motor speed control, and servo positioning.

Hardware GPIO12, 13, 18, 19
Frequency 1Hz - 1MHz
Duty Cycle 0-100% (0.1% res)
Servo 500-2500μs pulse

Configuration

{cfg.key} number GPIO pin number
{cfg.key} number PWM frequency in Hz
{cfg.key} number 0-100 percentage
{cfg.key} string "pwm" | "servo"

Output Example

{node.details.output}
Hardware PWM (GPIO12, 13, 18, 19) is more precise. Use software PWM for other pins.

i2c

Popular

Communicate with I2C devices like sensors, displays, and expanders.

Bus GPIO2=SDA, GPIO3=SCL
Speed 100kHz or 400kHz
Address 7-bit (0x03-0x77)
Devices Up to 127 per bus

Configuration

{cfg.key} string Device I2C address (hex)
{cfg.key} number I2C bus number (default: 1)
{cfg.key} string Register address to read/write
{cfg.key} number Bytes to read

Output Example

{node.details.output}
Enable I2C with sudo raspi-config. Use i2cdetect -y 1 to scan for devices.

spi

High-speed SPI communication for displays, ADCs, and flash memory.

Pins MOSI/MISO/SCLK
Chip Select GPIO8, GPIO7
Speed Up to 125MHz
Modes 0, 1, 2, 3

Configuration

{cfg.key} number 0 (CE0) or 1 (CE1)
{cfg.key} number Clock speed in Hz
{cfg.key} number SPI mode (0-3)
{cfg.key} number Usually 8

Output Example

{node.details.output}
SPI is full-duplex: data sent and received simultaneously. Enable via raspi-config.

1-wire

Read data from 1-Wire devices like DS18B20 temperature sensors.

Default Pin GPIO4
Protocol Dallas 1-Wire
Devices DS18B20, DS1822
Multi-device 10+ per bus

Configuration

{cfg.key} number GPIO pin (default: 4)
{cfg.key} string Specific ID or "all"
{cfg.key} number 9, 10, 11, or 12 bits
{cfg.key} number Polling interval in ms

Output Example

{node.details.output}
Requires 4.7kΩ pull-up resistor. Enable overlay: dtoverlay=w1-gpio.

serial

Serial port communication (UART) for GPS modules, displays, and other devices.

Pins GPIO14 TX, GPIO15 RX
Baud 300 - 4000000
Data Bits 5, 6, 7, 8
Parity None, Even, Odd

Configuration

{cfg.key} string /dev/ttyS0 or /dev/ttyAMA0
{cfg.key} number 9600, 115200, etc.
{cfg.key} number 8
{cfg.key} string "none" | "even" | "odd"

Output Example

{node.details.output}
Disable serial console first via raspi-config. TX/RX are 3.3V logic.

interrupt

Hardware interrupt handling for time-critical event detection.

Trigger Rising, falling, both
Latency < 100μs typical
Priority Hardware-level
Timestamp Microsecond precision

Configuration

{cfg.key} number GPIO pin number
{cfg.key} string "rising" | "falling" | "both"
{cfg.key} number Debounce time in μs
{cfg.key} number Max wait time (0 = forever)

Output Example

{node.details.output}
More efficient than polling. Use for buttons, encoders, and event sensors.

GPIO Pin Reference

Power Pins

3.3V and 5V power outputs. Never connect 5V to GPIO - it will damage your board.

Digital GPIO

General purpose I/O pins for digital signals. Use BCM numbering (GPIO17, not pin 11).

I2C Bus

GPIO2 (SDA) and GPIO3 (SCL) for I2C devices. Supports 100kHz and 400kHz speeds.

SPI Bus

GPIO10 (MOSI), GPIO9 (MISO), GPIO11 (SCLK). Two chip selects: CE0 and CE1.