<?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=Bingo%E6%B8%B8%E6%88%8F%E6%9C%BA03</id>
		<title>Bingo游戏机03 - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Bingo%E6%B8%B8%E6%88%8F%E6%9C%BA03"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Bingo%E6%B8%B8%E6%88%8F%E6%9C%BA03&amp;action=history"/>
		<updated>2026-04-21T07:12:53Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Bingo%E6%B8%B8%E6%88%8F%E6%9C%BA03&amp;diff=18380&amp;oldid=prev</id>
		<title>2016年10月25日 (二) 08:36 Yanglibin@microduino.cc</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Bingo%E6%B8%B8%E6%88%8F%E6%9C%BA03&amp;diff=18380&amp;oldid=prev"/>
				<updated>2016-10-25T08:36:06Z</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月25日 (二) 08:36的版本&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-l59&quot; &gt;第59行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第59行：&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 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 style=&quot;font-weight: bold; text-decoration: none;&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 style=&quot;font-weight: bold; text-decoration: none;&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 style=&quot;font-weight: bold; text-decoration: none;&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=Bingo%E6%B8%B8%E6%88%8F%E6%9C%BA03&amp;diff=18369&amp;oldid=prev</id>
		<title>Yanglibin@microduino.cc：创建页面，内容为“{| style=&quot;width: 1000px;&quot; |- |  ==概述== center  优化检测位置程序，防止“乱拧瞎蒙”的方法刷分。 &lt;br...”</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Bingo%E6%B8%B8%E6%88%8F%E6%9C%BA03&amp;diff=18369&amp;oldid=prev"/>
				<updated>2016-10-25T08:08:02Z</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_Bingo_game_1.jpg&quot; title=&quot;文件:Anywhere Bingo game 1.jpg&quot;&gt;600px|center&lt;/a&gt;  优化检测位置程序，防止“乱拧瞎蒙”的方法刷分。 &amp;lt;br...”&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_Bingo game 1.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-Hub/zh|mCookie-Hub]]||1||传感器转接板&lt;br /&gt;
|-&lt;br /&gt;
|[[mCookie-OLED/zh|mCookie-OLED]]||1||显示&lt;br /&gt;
|-&lt;br /&gt;
|[[Sensor-Potentiometer/zh|电位器]]||1||检测旋转&lt;br /&gt;
|-&lt;br /&gt;
|[[Sensor-Buzzer/zh|Buzzer]]||1||发声&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===其他设备===&lt;br /&gt;
*USB数据线*1&lt;br /&gt;
*传感器连接线*2&lt;br /&gt;
*传感器外壳&lt;br /&gt;
*乐高或其它固定结构&lt;br /&gt;
[[File:anywhere_Bingo game 2-module.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
==模块搭建==&lt;br /&gt;
===搭建===&lt;br /&gt;
[[File:anywhere_Bingo game 2－step.jpg|600px|center]]&lt;br /&gt;
*将模块和传感器组装起来：&lt;br /&gt;
**将红色的核心模块，电池底座、OLED与绿色的扩展模块吸在一起；&lt;br /&gt;
**将蜂鸣器连接在Hub的8/9管脚；&lt;br /&gt;
**将旋转电位计连接在Hub的A0管脚。&lt;br /&gt;
**将USB连接线一端插入电池底座，另一端连接电脑。&lt;br /&gt;
&lt;br /&gt;
==编程==&lt;br /&gt;
&lt;br /&gt;
===编程思路===&lt;br /&gt;
判断对齐成立以后，如果100毫秒后旋转电位计值无变化，则成功对齐，其他程序不变。&lt;br /&gt;
[[File:mixly-ctrl-Bingo game 3.jpg|600px|center]]&lt;br /&gt;
&lt;br /&gt;
===使用的程序块===&lt;br /&gt;
*[[“OLED显示－打印”程序块]]&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;
'''1、声明变量，存储数据'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
a变量用来存储随机数，a_random存储随机变化数，b存储文字移动范围，score变量用来储存分数，bingo变量用来存储数字对齐状态，hold变量用来存储对齐一瞬间旋转电位计的原始值。&lt;br /&gt;
[[File:mixly-ctrl-mixly-ctrl-Bingo game 3－code.jpg|600px|center]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''2、 更改BINGO函数内容'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
如果判断到数字对齐，则将旋转电位计的值存入hold（这里用的是没经过换算的原始值，因为原始值比较精确），然后延时100毫秒之后如果旋转电位计的值等于hold（100毫秒内，旋转电位计没动过），则认为对齐，执行加分、响蜂鸣器程序。&lt;br /&gt;
[[File:mixly-ctrl-Bingo game 3－code1.jpg|600px|center]]&lt;br /&gt;
'''3、开始函数和显示函数不需要做任何更改。'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:mixly-ctrl-Bingo game 3－code2.jpg|600px|center]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''4、执行函数'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
最后执行每个函数就行了。&lt;br /&gt;
[[File:mixly-ctrl-Bingo game 3－code3.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;
上传成功后，OLED第一行显示一个与上次不同的随机数，第二行显示“1 2 3 4 5 6”， 第三行显示SCORE:0。旋转电位计“1 2 3 4 5 6”移动，当随机数与相应数字对齐时，并且保持旋转电位计100毫秒不动，第三行的分数增加，并且蜂鸣器响起。&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
[[File:anywhere_Bingo game 1.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：当然可以，我们增加计时函数，如果超过一定时间，就重新生成随机数。'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
在生成随机数之后开始计时，计时超过3000毫秒时，蜂鸣器低音嘀、红灯闪烁一次、miss设为1（重新生成随机数）。&lt;br /&gt;
[[File:mixly-ctrl2-Bingo game 3.jpg|600px|center]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
'''1、变量声明，存储数据'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
增加miss变量用来记录超时状态。&lt;br /&gt;
执行time_out函数（超时判断）。&lt;br /&gt;
[[File:mixly-ctrl-Bingo game 3－code4.jpg|600px|center]]&lt;br /&gt;
'''2、更改start函数'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
如果bingo等于1或miss等于1（已超时），则执行重新生成随机数程序，miss变量清零，timer1计时器开始（重新计时）。&lt;br /&gt;
[[File:mixly-ctrl-Bingo game 3－code5.jpg|600px|center]]&lt;br /&gt;
'''3、time_out函数内容。'''&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
如果timer1时间大于3秒（随机数已经生成3秒了，还没对齐数字），&lt;br /&gt;
则红灯闪烁一下、蜂鸣器发出一声低音嘀声。&lt;br /&gt;
miss变量设为1（通知start函数已超时）。&lt;br /&gt;
[[File:mixly-ctrl-Bingo game 3－code6.jpg|600px|center]]&lt;br /&gt;
4、显示函数不需要更改。bingo函数不用改。&lt;br /&gt;
[[File:mixly-ctrl-Bingo game 3－code7.jpg|600px|center]]&lt;br /&gt;
==技术规范==&lt;br /&gt;
*电位器详细参考[[Sensor-Potentiometer/zh|电位器]]&lt;br /&gt;
*OLED显示屏详细参考[[mCookie-OLED/zh|mCookie-OLED]]&lt;br /&gt;
&lt;br /&gt;
==相关案例==&lt;br /&gt;
*[[Bingo游戏机01]]&lt;br /&gt;
*[[Bingo游戏机02]]&lt;br /&gt;
*[[Bingo游戏机04]]&lt;br /&gt;
*[[Bingo游戏机05]]&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>