gobot.io/x/gobot/v2@v2.1.0/platforms/beaglebone/doc.go (about) 1 /* 2 Package beaglebone provides the Gobot adaptor for the Beaglebone Black/Green, as well as a 3 separate Adaptor for the PocketBeagle. 4 5 Installing: 6 7 go get gobot.io/x/gobot/v2/platforms/beaglebone 8 9 Example: 10 11 package main 12 13 import ( 14 "time" 15 16 "gobot.io/x/gobot/v2" 17 "gobot.io/x/gobot/v2/drivers/gpio" 18 "gobot.io/x/gobot/v2/platforms/beaglebone" 19 ) 20 21 func main() { 22 beagleboneAdaptor := beaglebone.NewAdaptor() 23 led := gpio.NewLedDriver(beagleboneAdaptor, "P9_12") 24 25 work := func() { 26 gobot.Every(1*time.Second, func() { 27 led.Toggle() 28 }) 29 } 30 31 robot := gobot.NewRobot("blinkBot", 32 []gobot.Connection{beagleboneAdaptor}, 33 []gobot.Device{led}, 34 work, 35 ) 36 37 robot.Start() 38 } 39 40 For more information refer to the beaglebone README: 41 https://github.com/hybridgroup/gobot/blob/master/platforms/beaglebone/README.md 42 */ 43 package beaglebone // import "gobot.io/x/gobot/v2/platforms/beaglebone"