<?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=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C%2Fzh</id>
		<title>第二课--多个led的闪烁实验/zh - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C%2Fzh"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;action=history"/>
		<updated>2026-04-21T18:50:10Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=5618&amp;oldid=prev</id>
		<title>2014年11月5日 (三) 07:30 Radiumray9@gmail.com</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=5618&amp;oldid=prev"/>
				<updated>2014-11-05T07:30:16Z</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;2014年11月5日 (三) 07:30的版本&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-l1&quot; &gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&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;{{Language|Maple Lesson 02 - Multiple LED Blinking}}&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;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&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;{| style=&amp;quot;width: 800px;&amp;quot;&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;/table&gt;</summary>
		<author><name>Radiumray9@gmail.com</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=3724&amp;oldid=prev</id>
		<title>2014年8月17日 (日) 06:17 Jasonsheng</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=3724&amp;oldid=prev"/>
				<updated>2014-08-17T06:17:35Z</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;2014年8月17日 (日) 06:17的版本&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-l1&quot; &gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&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 style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;{{Language|Lesson_2--STM32 Multiple_led_flashes_experiments}}&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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;{| style=&amp;quot;width: 800px;&amp;quot;&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;{| style=&amp;quot;width: 800px;&amp;quot;&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;/table&gt;</summary>
		<author><name>Jasonsheng</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=3721&amp;oldid=prev</id>
		<title>2014年8月17日 (日) 06:08 Jasonsheng</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=3721&amp;oldid=prev"/>
				<updated>2014-08-17T06:08:12Z</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;2014年8月17日 (日) 06:08的版本&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-l1&quot; &gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&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;{{Language|Lesson_2--Multiple_led_flashes_experiments}}&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;{{Language|Lesson_2--&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;STM32 &lt;/ins&gt;Multiple_led_flashes_experiments}}&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;{| style=&amp;quot;width: 800px;&amp;quot;&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;{| style=&amp;quot;width: 800px;&amp;quot;&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;/table&gt;</summary>
		<author><name>Jasonsheng</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=3720&amp;oldid=prev</id>
		<title>2014年8月17日 (日) 06:06 Jasonsheng</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=3720&amp;oldid=prev"/>
				<updated>2014-08-17T06:06:42Z</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;2014年8月17日 (日) 06:06的版本&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-l1&quot; &gt;第1行：&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;第1行：&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;{{Language|Lesson_2--Multiple_led_flashes_experiments}}&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;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&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;{| style=&amp;quot;width: 800px;&amp;quot;&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;/table&gt;</summary>
		<author><name>Jasonsheng</name></author>	</entry>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=3345&amp;oldid=prev</id>
		<title>Pkj：Created page with &quot;{| style=&quot;width: 800px;&quot; |- | ==目的== 通过第一个实验，我们已经知道如何控制一个led灯，接下来稍微扩展下，制作花样流水灯。 ==设备== *[...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=%E7%AC%AC%E4%BA%8C%E8%AF%BE--%E5%A4%9A%E4%B8%AAled%E7%9A%84%E9%97%AA%E7%83%81%E5%AE%9E%E9%AA%8C/zh&amp;diff=3345&amp;oldid=prev"/>
				<updated>2014-07-17T15:07:27Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| style=&amp;quot;width: 800px;&amp;quot; |- | ==目的== 通过第一个实验，我们已经知道如何控制一个led灯，接下来稍微扩展下，制作花样流水灯。 ==设备== *[...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==目的==&lt;br /&gt;
通过第一个实验，我们已经知道如何控制一个led灯，接下来稍微扩展下，制作花样流水灯。&lt;br /&gt;
==设备==&lt;br /&gt;
*[[ Microduino-CoreSTM32]]&lt;br /&gt;
Microduino-CoreSTM32是采用 STM32F103CBT6芯片的ARM开发板，采用独特的Upin7接口，大小与一枚一元硬币差不多大，完全兼容Microduino其他扩展模块。&lt;br /&gt;
*其他硬件设备&lt;br /&gt;
**面包板跳线  	一盒  &lt;br /&gt;
**面包板  	一块  &lt;br /&gt;
**LED发光二极管  八个  &lt;br /&gt;
**220欧姆电阻  	八个  &lt;br /&gt;
**USB数据连接线  一根&lt;br /&gt;
&lt;br /&gt;
[[File:STM32-lesson2All.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==实验原理图==&lt;br /&gt;
我们采用8个led灯，因此我们需要用到8个I/O口。&lt;br /&gt;
 [[File: STM32-lesson2Setup.jpg|600px|center|thumb]]&lt;br /&gt;
led的阴极接Microduino-CoreSTM32的GND，阳极接Microduino-CoreSTM32数据控制口D3~D10，高电平点亮led。我们可以通过设置高低电平来实现花样流水的效果。&lt;br /&gt;
==程序==&lt;br /&gt;
*程序一：&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
void setup() {                &lt;br /&gt;
//定义数字D3~D10脚为输出   &lt;br /&gt;
  for(int i=3;i&amp;lt;11;i++)&lt;br /&gt;
  pinMode(i, OUTPUT);     &lt;br /&gt;
}&lt;br /&gt;
void loop() {&lt;br /&gt;
  for(int i=3;i&amp;lt;11;i++)&lt;br /&gt;
  {&lt;br /&gt;
  digitalWrite(i, HIGH); // 数据口i(D3~D10)输出高电平&lt;br /&gt;
  delay(50);            //延时50ms  &lt;br /&gt;
  digitalWrite(i, LOW); //// 数据口i(D3~D10)输出低电平&lt;br /&gt;
  delay(50);           //延时50ms    &lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
我们来看看程序结构：&lt;br /&gt;
采用for()循环结构语句，通过pinMode()函数定义数字D3~D10脚为输出，再通过for()循环依次让每个led灯闪烁。&lt;br /&gt;
*程序二：&lt;br /&gt;
采用16进制数组，将数据移位输出送至每个I/O口，花样流水&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
/*===============================================&lt;br /&gt;
ox（高-低：10，9，8，7）（高-低：6，5，4，3）&lt;br /&gt;
例如&lt;br /&gt;
0x81:10000001&lt;br /&gt;
10,9,8,7,6,5,4,3&lt;br /&gt;
↓  ↓ ↓ ↓↓ ↓↓ ↓&lt;br /&gt;
1  0 0 0 0 0 0 1&lt;br /&gt;
在共阴即所有led阴极都接在一起情况下，1代表亮，0代表灭，&lt;br /&gt;
就可以通过数组形式直接控制亮度。&lt;br /&gt;
=================================================*/&lt;br /&gt;
long  data[]=&lt;br /&gt;
{&lt;br /&gt;
  0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80,//单独一个从左至右亮&lt;br /&gt;
  0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01,//单独一个从从右至左亮&lt;br /&gt;
  0x81,0x42,0x24,0x18,0x18,0x24,0x42,0x81,//两边往中间亮及中间往两边亮&lt;br /&gt;
  0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff,//从左到右依次点亮&lt;br /&gt;
  0xff,0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,//从右到左依次熄灭&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void setup() &lt;br /&gt;
{                &lt;br /&gt;
  for(int x=3;x&amp;lt;11;x++) &lt;br /&gt;
  {&lt;br /&gt;
    pinMode(x,OUTPUT);//设置输出引脚&lt;br /&gt;
  }  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
void loop() &lt;br /&gt;
{&lt;br /&gt;
  for(int x=0;x&amp;lt;40;x++)//分别读取不同花样灯&lt;br /&gt;
  {&lt;br /&gt;
    leddisplay(data[x]);&lt;br /&gt;
    delay(200); //每个状态显示200ms&lt;br /&gt;
  }&lt;br /&gt;
  leddisplay(0x00);//循环完毕全灭&lt;br /&gt;
  delay(200);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void leddisplay(int num)    // 将花样字模对应到端口显示&lt;br /&gt;
{&lt;br /&gt;
  /*====================================================================&lt;br /&gt;
  先将16进制数向右移x位（num&amp;gt;&amp;gt;x），x代表了Microduino-CoreSTM32I/O口对应16进制的某位，&lt;br /&gt;
  0是最低位，7是最高位。再将移的数据与0x01按位与，就可以得到16进制数某位的&lt;br /&gt;
  数据（0或1），再将其值赋值给Microduino-CoreSTM32的I/O就行。 &lt;br /&gt;
 ====================================================================*/&lt;br /&gt;
  digitalWrite(3, ((num&amp;gt;&amp;gt;0)&amp;amp;0x01));&lt;br /&gt;
  digitalWrite(4, ((num&amp;gt;&amp;gt;1)&amp;amp;0x01));&lt;br /&gt;
  digitalWrite(5, ((num&amp;gt;&amp;gt;2)&amp;amp;0x01));&lt;br /&gt;
  digitalWrite(6, ((num&amp;gt;&amp;gt;3)&amp;amp;0x01));&lt;br /&gt;
  digitalWrite(7, ((num&amp;gt;&amp;gt;4)&amp;amp;0x01));&lt;br /&gt;
  digitalWrite(8, ((num&amp;gt;&amp;gt;5)&amp;amp;0x01));&lt;br /&gt;
  digitalWrite(9,((num&amp;gt;&amp;gt;6)&amp;amp;0x01));&lt;br /&gt;
  digitalWrite(10,((num&amp;gt;&amp;gt;7)&amp;amp;0x01));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
将16进制数对应赋值到I/O，比如0x18表示2进制的00011000，对应值为“1”的灯亮，“0”的灭。能简单随意的写出各种花样。&lt;br /&gt;
两个实验比较，第一个实验看起来简单，效果单一，并且输出口必须连续，局限性很大。第二个实验就优化了，利用数组，将16进制的每位得值都赋值给指定的I/O口，可以实现花样流水。&lt;br /&gt;
&lt;br /&gt;
==调试==&lt;br /&gt;
*按照原理图接线&lt;br /&gt;
[[File: STM32-lesson1yuanli.jpg|600px|center|thumb]]&lt;br /&gt;
*打开Maple IDE编译器，将程序拷贝到编译器中，选择好板卡（Microduino-CoreSTM32 to Flash）。点击下载按钮或者使用快捷键（Ctrl+U）即可完成下载。&lt;br /&gt;
==结果==&lt;br /&gt;
*程序一&lt;br /&gt;
led从左到右依次循环点亮每一个led。&lt;br /&gt;
*程序二&lt;br /&gt;
可以看到五种花样效果：单独一个从左至右亮；单独一个从从右至左亮；两边往中间亮及中间往两边亮；从左到右依次点亮；从右到左依次熄灭。|}&lt;/div&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	</feed>