<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-CN">
		<id>http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6</id>
		<title>体感控制 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6&amp;action=history"/>
		<updated>2026-06-06T09:14:22Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6&amp;diff=20880&amp;oldid=prev</id>
		<title>Zhangfengfeng：/* 模块清单 */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6&amp;diff=20880&amp;oldid=prev"/>
				<updated>2017-06-16T02:38:32Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;模块清单&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2017年6月16日 (五) 02:38的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot; &gt;第23行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第23行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|[[MCookie-Motion/zh|姿态模块]]||1||检测姿态，相当于陀螺仪&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|[[MCookie-Motion/zh|姿态模块]]||1||检测姿态，相当于陀螺仪&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;[[&lt;/del&gt;N20减速电机&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;]]&lt;/del&gt;||1||持续转动&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|N20减速电机||1||持续转动&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;|}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Zhangfengfeng</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6&amp;diff=18473&amp;oldid=prev</id>
		<title>2016年10月31日 (一) 03:02 Yanglibin@microduino.cc</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6&amp;diff=18473&amp;oldid=prev"/>
				<updated>2016-10-31T03:02:00Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;zh-CN&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;←上一版本&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;2016年10月31日 (一) 03:02的版本&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot; &gt;第36行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第36行：&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:anywhere_motion－motor－step.jpg|600px|center]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:anywhere_motion－motor－step.jpg|600px|center]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*将模块和传感器组装起来：&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;*将模块和传感器组装起来：&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;将将电机连接在电机模块的1A&lt;/del&gt;/1B接口；&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;将电机连接在电机模块的1A&lt;/ins&gt;/1B接口；&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**将红色的核心控制、黄色的姿态模块和绿色的电机模块吸在黄色的电池底座上；&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**将红色的核心控制、黄色的姿态模块和绿色的电机模块吸在黄色的电池底座上；&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**将USB连接线一头插入电池底座，另一头连接上电脑。&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;**将USB连接线一头插入电池底座，另一头连接上电脑。&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Yanglibin@microduino.cc</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6&amp;diff=18445&amp;oldid=prev</id>
		<title>Yanglibin@microduino.cc：创建页面，内容为“{| style=&quot;width: 1000px;&quot; |- |  ==概述== center  我们通过姿态模块来控制电机速度。 &lt;br&gt;  ==模块清单==...”</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E4%BD%93%E6%84%9F%E6%8E%A7%E5%88%B6&amp;diff=18445&amp;oldid=prev"/>
				<updated>2016-10-28T06:41:13Z</updated>
		
		<summary type="html">&lt;p&gt;创建页面，内容为“{| style=&amp;quot;width: 1000px;&amp;quot; |- |  ==概述== &lt;a href=&quot;/index.php/%E6%96%87%E4%BB%B6:Anywhere_motion%EF%BC%8Dmotor.jpg&quot; title=&quot;文件:Anywhere motion－motor.jpg&quot;&gt;600px|center&lt;/a&gt;  我们通过姿态模块来控制电机速度。 &amp;lt;br&amp;gt;  ==模块清单==...”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| style=&amp;quot;width: 1000px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
==概述==&lt;br /&gt;
[[File:anywhere_motion－motor.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
我们通过姿态模块来控制电机速度。&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==模块清单==&lt;br /&gt;
===模块===&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|模块||数量||功能&lt;br /&gt;
|-&lt;br /&gt;
|[[mCookie-Core/zh|mCookie-Core]]||1||核心板&lt;br /&gt;
|-&lt;br /&gt;
|[[mCookie-Battery|电池盒]]||1||程序下载和供电模块&lt;br /&gt;
|-&lt;br /&gt;
|[[MCookie-Motor/zh|电机驱动模块]]||1||驱动电机&lt;br /&gt;
|-&lt;br /&gt;
|[[MCookie-Motion/zh|姿态模块]]||1||检测姿态，相当于陀螺仪&lt;br /&gt;
|-&lt;br /&gt;
|[[N20减速电机]]||1||持续转动&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===其他设备===&lt;br /&gt;
*USB数据线*1&lt;br /&gt;
*乐高或其它固定结构&lt;br /&gt;
[[File:anywhere_motion－motor-module.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
==模块搭建==&lt;br /&gt;
===搭建===&lt;br /&gt;
[[File:anywhere_motion－motor－step.jpg|600px|center]]&lt;br /&gt;
*将模块和传感器组装起来：&lt;br /&gt;
**将将电机连接在电机模块的1A/1B接口；&lt;br /&gt;
**将红色的核心控制、黄色的姿态模块和绿色的电机模块吸在黄色的电池底座上；&lt;br /&gt;
**将USB连接线一头插入电池底座，另一头连接上电脑。&lt;br /&gt;
&lt;br /&gt;
==编程==&lt;br /&gt;
&lt;br /&gt;
===编程思路===&lt;br /&gt;
电机准备姿态校准后，获取俯仰角度将俯仰角约束在-90到90度之间。将俯仰角映射在电机的控制转速区间（-255到255），最后控制电机的方向和转速。&lt;br /&gt;
[[File:mixly-ctrl-motion－motor.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
===使用的程序块===&lt;br /&gt;
*[[“姿态DMP解算”程序块]]&lt;br /&gt;
*[[“获取姿态角”程序块]]&lt;br /&gt;
*[[“电机准备”程序块]]&lt;br /&gt;
*[[“电机选择”程序块]]&lt;br /&gt;
*[[“变量声明”、“变量赋值”程序块]]&lt;br /&gt;
*[[“映射”程序块]]&lt;br /&gt;
*[[“约束”程序块]]&lt;br /&gt;
&lt;br /&gt;
===开始编程===&lt;br /&gt;
'''1、电机准备，姿态校准，声明变量'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
电机准备。&lt;br /&gt;
姿态解算。&lt;br /&gt;
X变量用来存储电机转速。&lt;br /&gt;
[[File:mixly-ctrl-motion－motor-code.jpg|600px|center]]&lt;br /&gt;
'''2、获取俯仰角度，映射到电机控制'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
获将俯仰角存入X。&lt;br /&gt;
将X约束至-90至90之间。&lt;br /&gt;
将X从-90至90，映射到-255至255。&lt;br /&gt;
[[File:mixly-ctrl-motion－motor-code1.jpg|600px|center]]&lt;br /&gt;
'''3、控制电机'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
将X显示到串口监视器。&lt;br /&gt;
将1A1B接口电机速度设为X。&lt;br /&gt;
[[File:mixly-ctrl-motion－motor-code2.jpg|600px|center]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''测试结果'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
开机前保证姿态模块水平，5秒后在俯仰方向上可以控制电机转速和方向，倾斜角度越大，转速越大。&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:anywhere_motion－motor.jpg|600px|center]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Q：现在要将整个装置倾斜到90度才能让电机全速转动，如何增加装置的灵敏度呢？'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''A：将角度值约束、映射得范围小一点就行。'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
将X约束至-20至20之间&lt;br /&gt;
将X从-20至20，映射到-255至255&lt;br /&gt;
（现在将装置倾斜到20度就可以让电机全速转动了）。&lt;br /&gt;
[[File:mixly-ctrl-motion－motor－code3.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
==技术规范==&lt;br /&gt;
*姿态模块详细参考：[[MCookie-Motion/zh|姿态模块]]&lt;br /&gt;
*电机驱动详细参考[[MCookie-Motor/zh|电机驱动模块]]&lt;br /&gt;
&lt;br /&gt;
==相关案例==&lt;br /&gt;
*[[转速指示器]]&lt;br /&gt;
*[[体感表情]]&lt;br /&gt;
&lt;br /&gt;
==Q&amp;amp;A==&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Yanglibin@microduino.cc</name></author>	</entry>

	</feed>