1
0
mirror of https://github.com/hybridgroup/gobot.git synced 2025-04-24 13:48:49 +08:00

27 lines
332 B
Go

//go:build example
// +build example
//
// Do not build by default.
package main
import (
"fmt"
"time"
"gobot.io/x/gobot/v2"
)
func main() {
robot := gobot.NewRobot(
func() {
gobot.Every(500*time.Millisecond, func() { fmt.Println("Greetings human") })
},
)
if err := robot.Start(); err != nil {
panic(err)
}
}