gopigo3: correct error in example

Signed-off-by: deadprogram <ron@hybridgroup.com>
This commit is contained in:
deadprogram 2017-10-23 13:15:55 +02:00
parent 5e2ea8c39c
commit 9dada20d35
1 changed files with 3 additions and 3 deletions

View File

@ -15,16 +15,16 @@ import (
func main() {
raspiAdaptor := raspi.NewAdaptor()
gpg3 := g.NewDriver(raspiAdaptor)
gpg3 := gopigo3.NewDriver(raspiAdaptor)
work := func() {
on := uint8(0xFF)
gobot.Every(1000*time.Millisecond, func() {
err := gpg3.SetLED(g.LED_EYE_RIGHT, 0x00, 0x00, on)
err := gpg3.SetLED(gopigo3.LED_EYE_RIGHT, 0x00, 0x00, on)
if err != nil {
fmt.Println(err)
}
err = gpg3.SetLED(g.LED_EYE_LEFT, ^on, 0x00, 0x00)
err = gpg3.SetLED(gopigo3.LED_EYE_LEFT, ^on, 0x00, 0x00)
if err != nil {
fmt.Println(err)
}