<?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=%E6%97%8B%E8%BD%AC%E5%B9%BF%E5%91%8A%E7%89%8C2</id>
		<title>旋转广告牌2 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E6%97%8B%E8%BD%AC%E5%B9%BF%E5%91%8A%E7%89%8C2"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E6%97%8B%E8%BD%AC%E5%B9%BF%E5%91%8A%E7%89%8C2&amp;action=history"/>
		<updated>2026-04-21T05:23:30Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E6%97%8B%E8%BD%AC%E5%B9%BF%E5%91%8A%E7%89%8C2&amp;diff=18327&amp;oldid=prev</id>
		<title>Yanglibin@microduino.cc：/* 使用到程序块 */</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E6%97%8B%E8%BD%AC%E5%B9%BF%E5%91%8A%E7%89%8C2&amp;diff=18327&amp;oldid=prev"/>
				<updated>2016-10-24T02:49:25Z</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;2016年10月24日 (一) 02:49的版本&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-l47&quot; &gt;第47行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第47行：&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;*[[“舵机”程序块]]&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;]]&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;“变量声明”、“变量赋值”程序块]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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;*[[“按次执行”程序块]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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;*[[“映射”程序块]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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;*[[“打印（自动换行）”程序块]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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;*[[“计算”程序块&lt;/ins&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;/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>Yanglibin@microduino.cc</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E6%97%8B%E8%BD%AC%E5%B9%BF%E5%91%8A%E7%89%8C2&amp;diff=18321&amp;oldid=prev</id>
		<title>Yanglibin@microduino.cc：创建页面，内容为“{| style=&quot;width: 1000px;&quot; |- |  ==概述== center  做个有字体滚动效果的广告牌，并且字体滚动动作...”</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E6%97%8B%E8%BD%AC%E5%B9%BF%E5%91%8A%E7%89%8C2&amp;diff=18321&amp;oldid=prev"/>
				<updated>2016-10-24T02:37:28Z</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_Servo_advertising2.jpg&quot; title=&quot;文件:Anywhere Servo advertising2.jpg&quot;&gt;600px|center&lt;/a&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_Servo_advertising2.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
做个有字体滚动效果的广告牌，并且字体滚动动作和广告牌旋转动作同步。&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
适合套件：mCookie202，mCookie302&lt;br /&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-Hub/zh|mCookie-Hub]]||1||传感器转接板&lt;br /&gt;
|-&lt;br /&gt;
|[[舵机]]||1||舵机&lt;br /&gt;
|-&lt;br /&gt;
|[[Sensor-Servo Connector/zh|舵机转接板]]||1||舵机转接板&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===其他设备===&lt;br /&gt;
*USB数据线*1&lt;br /&gt;
*传感器连接线*1&lt;br /&gt;
*传感器外壳*1&lt;br /&gt;
*乐高或其它固定结构&lt;br /&gt;
[[File:anywhere_Servo-module_advertising.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
==模块搭建==&lt;br /&gt;
[[File:anywhere_Servo-module—step_advertising.jpg|600px|center]]&lt;br /&gt;
*将模块和传感器组装起来：&lt;br /&gt;
**将红色的核心模块，USB上传模块与绿色的扩展模块吸在一起；&lt;br /&gt;
**将舵机转接板连接在Hub的6/7管脚；&lt;br /&gt;
**将舵机连接在舵机转接板的1管脚（下面三个插针）；&lt;br /&gt;
**将OLED连接在Hub的IIC管脚。&lt;br /&gt;
**将USB连接线一端插入USB上传模块，另一端连接电脑；&lt;br /&gt;
&lt;br /&gt;
==编程==&lt;br /&gt;
===使用到程序块===&lt;br /&gt;
*[[“舵机”程序块]]&lt;br /&gt;
*[[“函数”程序块]]&lt;br /&gt;
&lt;br /&gt;
===编程思路===&lt;br /&gt;
使用按次执行128次（OLED屏宽度为128像素），文字水平位置设为（0-执行次数），并将执行次数从0-128映射到40-140（舵机在 40-140°范围内转动），就可以实现舵机转动同时文字向反方向滚动。&lt;br /&gt;
[[File:mixly-ctrl-Servo-advertising2.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
===开始编程===&lt;br /&gt;
'''1、屏幕右转，文字左移'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
A变量用来存储舵机角度。&lt;br /&gt;
将内部程序重复执行128次（正向计次）。&lt;br /&gt;
将重复次数从0-128映射到40-140（舵机在 40-140°范围内转动），舵机转到A°。&lt;br /&gt;
将“Welcome to playing mCookie!”&lt;br /&gt;
显示到OLED，X坐标为0-i，Y坐标为40。&lt;br /&gt;
[[File:mixly-ctrl-Servo-advertising2-code.jpg|600px|center]]&lt;br /&gt;
'''2、屏幕左转，文字右移'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
将内部程序重复执行128次（负向计次）。内部程序与上页一样。&lt;br /&gt;
[[File:mixly-ctrl-Servo-advertising2-code1.jpg|600px|center]]&lt;br /&gt;
'''测试结果'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
上传成功后， OLED屏幕文字向左滚动，舵机从40度位置一直转到140度，之后OLED屏幕文字向右滚动，舵机从140度位置转回到40度，重复循环。&lt;br /&gt;
[[File:anywhere_Servo_advertising2.jpg|600px|center]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''Q：感觉广告牌转得很慢，有什么办法能让旋转广告牌转得更快呢？'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''A：最简单的办法是改变舵机的转速，当然也可以改变按次执行的步长。之前的按次执行是每1步执行一次，现在改成每4步执行一次。'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
将按次执行改成每-4步执行一次。之前每1步执行一次，从0-128计次，内部程序共重复128次。现在每4步执行一次，从0-128计次，内部程序共重复32次。&lt;br /&gt;
[[File:mixly-ctrl-Servo-advertising2-code3.jpg|600px|center]]&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;
*'''[[旋转广告牌]]'''&lt;br /&gt;
&lt;br /&gt;
==Q&amp;amp;A==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Yanglibin@microduino.cc</name></author>	</entry>

	</feed>