本周的文件交换选择

我们最好的用户提交

Sphero.

Richard是MathWorks的咨询工程师,专注于嵌入式编码器产品,用于代码生成,主要是在航空航天行业。

理查德的本周选择Sphero连接包经过丹维尔Sethi.

内容

挑选

我本周的选择是Sphero连接包

如果你喜欢Matlab,那么你可能喜欢玩技术玩具。如果是这样,那么这篇文章适合你。Sphero.是一种廉价的差动机器人,可以从支持蓝牙的设备控制。它具有许多传感器(加速度计,陀螺仪,反态编码器),其允许其测量其位置和速度,具有相当程度的精度。Sphero的RGB LED允许它以任何颜色发光,而蓝背LED指示其当前方向。两个轮子允许Sphero在地面上滚动并沿其垂直轴旋转。

在通过您的手机或平板电脑玩Sphero的同时,能够使用您的工程技巧和Matlab,同时与界面连接并控制Sphero是一种爆炸​​。金宝app

你得到什么

Sphero连接包允许我们在Matlab(和Simulink)内与Sphero通信,在运行Windows或64位版本的Mac OS 10.7或更早版本的计算机上。金宝app包装主要基于“Sphero”类,这反过来依赖于MATLAB蓝牙类。The class methods and properties allow you to perform (within MATLAB) many operations available with the underlying Sphero API, such as connecting, disconnecting, sleeping, changing LED colors, reading (and/or streaming back) the Sphero’s position and velocity, and commanding each of the 2 motors independently. A higher-level roll command can also be used to move the Sphero with a certain speed and direction. The Simulink library contained in the package also features Simulink blocks for setup, timing, and basic sensing and actuation.

Readme.txt文件介绍了如何将Sphero配对到计算机,安装包,并在MATLAB中创建Sphero对象,而还包括若干示例以说明可用命令和Simulink块的使用。金宝app

例子

随着Sphero类和相应的Simulink库,包包括许多MATLAB示例和Simulink模金宝app型,用户可以从开发自己的自定义控件开始。下面是一些提供的例子的位置图。

你可以追踪哪些模式?

评论

Danvir的Sphero Connectivity包提供了一个很好的示例,您如何使用硬件界面和Simulink。金宝app如果你有一个sphero(或只需要一个借口买一送),请试一试,让我们知道你的想法这里或离开A.评论对于丹佛尔。

发布了MATLAB®R2018A

|
  • 打印
  • 发电子邮件

评论

要发表评论,请点击这里登录您的MathWorks帐户或创建新的。