ilango100 / go-wPi

Go wrapper for wiringPi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go wiringPi

GoDoc

go-wPi is a simple wrapper for accessing wiringPi functions via golang.

Example

package main

import(
    "github.com/ilango100/go-wPi"
)

func main() {
    wPi.WPi() // Should be called before any operation
    wPi.PinMode(2,wPi.Output)
    wPi.DigitalWrite(2,1)
}

You can also add stepper type to easily control a stepper motor.

wPi.Gpio() // Should be called before any operation
motor := wPi.NewStepper(200, 5, 6, 13, 19)
motor.Step(20)

Bugs / Contributing

Feel free to fork and create pull request and also to open an issue if you face one.

About

Go wrapper for wiringPi


Languages

Language:Go 100.0%