Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (17 sloc) 262 Bytes
package main
import (
"github.com/stianeikeland/go-rpio"
)
var (
pin = rpio.Pin(23) //GPIO4
)
func main() {
err := rpio.Open()
if err != nil {
panic(err)
}
defer rpio.Close()
for i := 0; i < 5000000; i++ {
pin.Read()
}
}