| 注册
请输入搜索内容

热门搜索

Java Linux MySQL PHP JavaScript Hibernate jQuery Nginx
jopen
10年前发布

机器人 Go 语言库:Gobot

Gobot 是为机器人和物理计算所设计的一组 Go 语言库,提供在同一时间合并多个不同设备的简单且强大的解决方案。
package main    import (    "github.com/hybridgroup/gobot"    "github.com/hybridgroup/gobot-sphero"  )    func main() {      spheroAdaptor := new(gobotSphero.SpheroAdaptor)    spheroAdaptor.Name = "Sphero"    spheroAdaptor.Port = "127.0.0.1:4560"      sphero := gobotSphero.NewSphero(spheroAdaptor)    sphero.Name = "Sphero"      connections := []interface{}{      spheroAdaptor,    }    devices := []interface{}{      sphero,    }      work := func() {      gobot.Every("2s", func() {        sphero.Roll(100, uint16(gobot.Random(0, 360)))      })    }      robot := gobot.Robot{      Connections: connections,      Devices:     devices,      Work:        work,    }      robot.Start()  }  

支持的硬件设备:

Gobot 有一套扩展的系统来连接硬件设备。

不久之后将会支持更多平台...

 本文由用户 jopen 自行上传分享,仅供网友学习交流。所有权归原作者,若您的权利被侵害,请联系管理员。
 转载本站原创文章,请注明出处,并保留原始链接、图片水印。
 本站是一个以用户分享为主的开源技术平台,欢迎各类分享!
 本文地址:https://www.open-open.com/lib/view/open1387204135687.html
Go语言 Google Go/Golang开发