Skip to content

chenqinghe/raspberrypi-gpio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

raspberrypi-gpio   中文说明

this project is a library to operate raspberry pi gpio pins.

usage

example

here is a example to control led.

ledpin := gpio.NewPin("led control", 4, gpio.OUT)

//expose pin to user space
if err := ledpin.Export(); err != nil {
	panic(err)
}
defer ledpin.Unexport()

//light led
if err := ledpin.Write(gpio.HIGH); err != nil {
	panic(err)
}

//twinkle
if err := ledpin.Blink(time.Second, time.Second*10); err != nil {
	panic(err)
}

license

this project is under MIT license.

About

a library to operate respberrypi gpio pins

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages