1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-29 13:49:14 +08:00
hybridgroup.gobot/examples/edison_blink_without_all_gobot_framework.go
deadprogram acfdbee0cb core: Convert all examples to use new Adaptor/Driver signatures
Signed-off-by: deadprogram <ron@hybridgroup.com>
2016-10-03 16:58:43 +02:00

24 lines
522 B
Go

package main
import (
"time"
"github.com/hybridgroup/gobot/drivers/gpio"
"github.com/hybridgroup/gobot/platforms/intel-iot/edison"
)
// Example of a simple led toggle without the initialization of
// the entire gobot framework.
// This might be useful if you want to use gobot as another
// golang library to interact with sensors and other devices.
func main() {
e := edison.NewAdaptor()
led := gpio.NewLedDriver(e, "13")
e.Connect()
led.Start()
for {
led.Toggle()
time.Sleep(1000 * time.Millisecond)
}
}