Ejemplo n.º 1
0
func main() {
	master := gobot.GobotMaster()
	gobot.Api(master)

	hello := new(gobot.Robot)
	hello.Name = "hello"
	hello.Commands = map[string]interface{}{"Hello": Hello}

	master.Robots = append(master.Robots, *hello)

	master.Start()
}
Ejemplo n.º 2
0
func main() {
	master := gobot.GobotMaster()
	api := gobot.Api(master)
	api.Username = "******"
	api.Password = "******"

	hello := new(gobot.Robot)
	hello.Name = "hello"
	hello.Commands = map[string]interface{}{"Hello": Hello}

	master.Robots = append(master.Robots, hello)

	master.Start()
}