A pure Go library for accessing Raspberry Pi GPIO pins without external C dependencies.
go-rpio is a Go library that provides low-level access to GPIO pins on Raspberry Pi single-board computers. It allows developers to control hardware peripherals like LEDs, sensors, and motors directly from Go code by memory-mapping the BCM2835 GPIO registers. The library solves the problem of needing external C dependencies for Raspberry Pi GPIO programming, offering a pure Go alternative.
Go developers building applications for Raspberry Pi, including IoT projects, robotics, home automation, and embedded systems that require hardware interaction.
Developers choose go-rpio because it eliminates external C library dependencies, simplifies deployment, and provides a clean Go API for comprehensive GPIO control, including advanced features like PWM and SPI that are often missing in other Go GPIO libraries.
:electric_plug: Raspberry Pi GPIO library for go-lang
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Eliminates external C libraries like WiringPi, simplifying deployment and cross-compilation as highlighted in the README's philosophy.
Uses memory mapping via /dev/mem or /dev/gpiomem for low-latency GPIO control, enabling fast pin operations as described in the features.
Supports advanced hardware features like PWM, SPI, and edge detection, which are often lacking in other Go GPIO libraries, per the README's release notes.
Works with Raspberry Pi models from A/B to Pi 4, as evidenced by the release history and key features section.
PWM modes and some operations still require root privileges, even with /dev/gpiomem, restricting use in secure or containerized environments.
Configuring /dev/gpiomem without root involves kernel upgrades, user group changes, and udev rules, which the README admits can be cumbersome.
Tied specifically to Raspberry Pi's BCM2835 chipset, making it unsuitable for projects that may need portability to other SBCs.
go-rpio is an open-source alternative to the following products: