Registry / other / stianeikeland-go-rpio-v4

stianeikeland-go-rpio-v4

JSON →
library4.6.0gogounverified

Provides GPIO access on Raspberry Pi without external C libraries, supporting simple I/O, PWM, and SPI operations.

go get github.com/stianeikeland/go-rpio/v4
INSTALL
IMPORT
SIG · STIANEIKELAND-GO-R
S
stianeikeland-go-rpio-v4
othergov4.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

rpio
github.com/stianeikeland/go-rpio/v4

Open GPIO, set pin 10 as output and set it high.

package main import "github.com/stianeikeland/go-rpio/v4" func main() { err := rpio.Open() if err != nil { panic(err) } defer rpio.Close() pin := rpio.Pin(10) pin.Output() pin.High() }
Debug
Known issues
gotchaRequires root or appropriate permissions to access GPIO memory.
fix
Run the program with sudo or add user to gpio group.
affects: all
Upgrade
Version history
4.6.0latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
stianeikeland-go-rpio-v4 — go get stianeikeland-go-rpio-v4 · libregistry