This commit is contained in:
Kunal Powar 2014-03-28 08:39:36 +05:30 committed by kunalpowar
parent 14b078a43e
commit e6854c3726
2 changed files with 24 additions and 0 deletions

View File

@ -42,6 +42,18 @@ Even shorter while prototyping:
...
embd.ToggleLED(3)
BBB + **PWM**:
import "github.com/kidoman/embd"
...
embd.InitGPIO()
defer embd.CloseGPIO()
...
pwm, _ := embd.NewPWMPin("P9_14")
defer pwm.Close()
...
pwm.SetDuty(1000)
NB: **3** == **USR3** for all intents and purposes. The driver is smart enough to figure all this out.
Control **GPIO** pins on the RaspberryPi / BeagleBone Black:

12
doc.go
View File

@ -25,6 +25,18 @@
...
embd.ToggleLED(3)
BBB + **PWM**:
import "github.com/kidoman/embd"
...
embd.InitGPIO()
defer embd.CloseGPIO()
...
pwm, _ := embd.NewPWMPin("P9_14")
defer pwm.Close()
...
pwm.SetDuty(1000)
Control GPIO pins on the RaspberryPi / BeagleBone Black:
import "github.com/kidoman/embd"