Skip to content

Extremely simple Go package for interacting with the GPIO pins on a Raspberry Pi

License

Notifications You must be signed in to change notification settings

nathan-osman/go-rpigpio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

go-rpigpio

GoDoc MIT License

This package provides a really simple interface for interacting with the GPIO pins on a Raspberry Pi.

Usage

The following example demonstrates writing to GPIO2:

import "github.com/nathan-osman/go-rpigpio"

p, err := rpi.OpenPin(2, rpi.OUT)
if err != nil {
    panic(err)
}
defer p.Close()

// set the pin to high (on)
p.Write(rpi.HIGH)

// set the pin to low (off)
p.Write(rpi.LOW)

About

Extremely simple Go package for interacting with the GPIO pins on a Raspberry Pi

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages