Movatterモバイル変換


[0]ホーム

URL:


periph

Peripherals I/O in Go
Edit this page

News

2022-05-29Cleaning up the old cruft to align on the future: Removing periph.io/x/periph
2021-05-29main: Renamed all repositories master branch to main
2020-12-30A new start: A new layout for Go modules in v3.6.7
2020-12-04Announcing v3.6.5: Let's just hope 2020 ends quickly
2019-08-27Announcing v3.6.2: Fixing go modules users
2019-08-23Announcing v3.6.1: RPi1 and Rpi Zero GPIO and amd64
See all 22 news entry...

boardimage

Overview

Periph is a standalone hardware library with limited external dependencies.

Features

Platforms

Devices

Tools

periph includes manyready-to-use tools:

go get periph.io/x/cmd/...# List the host drivers registered and/or initialized:periph-info# List the board headers:headers-list# List the state of each GPIO:gpio-list# Set P1_7/GPIO4 on a Raspberry Pi to high:gpio-write P1_71

Library

periph tries hard to get out of the way whenused as alibrary.

Here’s the minimal “toggle a LED” example:

packagemainimport("time""periph.io/x/conn/v3/gpio""periph.io/x/conn/v3/gpio/gpioreg""periph.io/x/host/v3")funcmain(){host.Init()p:=gpioreg.ByName("11")t:=time.NewTicker(500*time.Millisecond)forl:=gpio.Low;;l=!l{p.Out(l)<-t.C}}

Learn moreabout GPIOs.

boardimage

More infos

Contact

Authors

periph was initiated with ❤️️ and passion byMarc-AntoineRuel. The full list of contributors is in AUTHORSand CONTRIBUTORS in each repository.

Disclaimer

This is not an official Google product (experimental or otherwise), itis just code that happens to be owned by Google.

This project is not affiliated with the Go project.


[8]ページ先頭

©2009-2025 Movatter.jp