WiringPi bindings for golang.
- Init functions
- Core GPIO Operations
- Hardware PWM
- I2C
- SPI
- Software PWM
import "github.com/eternal-flame-AD/go-wiringpi"
func main() {
gpio, err := wiringpi.Setup(wiringpi.WiringPiSetup)
if err != nil {
panic(err)
}
gpio.PinMode(1, wiringpi.In)
if gpio.DigitalRead(1) == wiringpi.High {
fmt.Println("WiringPi port 1 is at high")
} else {
fmt.Println("WiringPi port 1 is at low")
}
}