|
|
|
@ -1,12 +1,36 @@
|
|
|
|
# periph - Peripherals I/O in Go
|
|
|
|
# periph - Peripherals I/O in Go
|
|
|
|
|
|
|
|
|
|
|
|
Documentation and samples are at https://periph.io
|
|
|
|
Documentation is at https://periph.io
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Sample
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~~~go
|
|
|
|
|
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"periph.io/x/periph/conn/gpio"
|
|
|
|
|
|
|
|
"periph.io/x/periph/host"
|
|
|
|
|
|
|
|
"periph.io/x/periph/host/rpi"
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
|
|
|
|
host.Init()
|
|
|
|
|
|
|
|
for l := gpio.Low; ; l = !l {
|
|
|
|
|
|
|
|
rpi.P1_33.Out(l)
|
|
|
|
|
|
|
|
time.Sleep(500 * time.Millisecond)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
~~~
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Visit https://periph.io for more samples.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Authors
|
|
|
|
## Authors
|
|
|
|
|
|
|
|
|
|
|
|
`periph` was initiated by [Marc-Antoine Ruel](https://github.com/maruel). The
|
|
|
|
`periph` was initiated with ❤️️ and passion by [Marc-Antoine
|
|
|
|
full list of contributors is in
|
|
|
|
Ruel](https://github.com/maruel). The full list of contributors is in
|
|
|
|
[AUTHORS](https://github.com/google/periph/blob/master/AUTHORS) and
|
|
|
|
[AUTHORS](https://github.com/google/periph/blob/master/AUTHORS) and
|
|
|
|
[CONTRIBUTORS](https://github.com/google/periph/blob/master/CONTRIBUTORS).
|
|
|
|
[CONTRIBUTORS](https://github.com/google/periph/blob/master/CONTRIBUTORS).
|
|
|
|
|
|
|
|
|
|
|
|
|