<?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=Microduino_Traffic_Light_Simulation</id>
		<title>Microduino Traffic Light Simulation - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Microduino_Traffic_Light_Simulation"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_Traffic_Light_Simulation&amp;action=history"/>
		<updated>2026-04-21T09:40:51Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_Traffic_Light_Simulation&amp;diff=7903&amp;oldid=prev</id>
		<title>1304410487@qq.com：Created page with &quot;{| style=&quot;width: 800px;&quot; |- |   ==Purpose==  The course will show you how to use Microduino to simulate a traffic light.    ==Equipment== {|class=&quot;wikitable&quot; |- |Module||Numbe...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_Traffic_Light_Simulation&amp;diff=7903&amp;oldid=prev"/>
				<updated>2015-03-09T07:06:48Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| style=&amp;quot;width: 800px;&amp;quot; |- |   ==Purpose==  The course will show you how to use Microduino to simulate a traffic light.    ==Equipment== {|class=&amp;quot;wikitable&amp;quot; |- |Module||Numbe...&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;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
&lt;br /&gt;
The course will show you how to use Microduino to simulate a traffic light.  &lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|Module||Number||Function&lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-Core]]||1||Core board &lt;br /&gt;
|-&lt;br /&gt;
|[[Microduino-USBTTL]] ||1||Program download  &lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
*Other equipment &lt;br /&gt;
{|class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|220Ω resistor||One &lt;br /&gt;
|-&lt;br /&gt;
|Breadboard jumper||One box &lt;br /&gt;
|-&lt;br /&gt;
|USB cable||One &lt;br /&gt;
|-&lt;br /&gt;
|Red LED||Two&lt;br /&gt;
|-&lt;br /&gt;
|Yellow LED||Two &lt;br /&gt;
|-&lt;br /&gt;
|Green LED||Two &lt;br /&gt;
|-&lt;br /&gt;
|White LED||Two&lt;br /&gt;
|-&lt;br /&gt;
|Breadboard||One &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
&lt;br /&gt;
[[File:trafficLightSechmatic.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
As the pictures show: &lt;br /&gt;
&lt;br /&gt;
Red light—Stop &lt;br /&gt;
&lt;br /&gt;
Yellow—Wait to turn color &lt;br /&gt;
&lt;br /&gt;
Green—Go   &lt;br /&gt;
&lt;br /&gt;
The driving light—white light together with blinking red light reminds pedestrians to stop. &lt;br /&gt;
&lt;br /&gt;
Just like this: &lt;br /&gt;
&lt;br /&gt;
[[File:trafficLightSechmaticsw.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
[[https://github.com/Microduino/Microduino_Tutorials/tree/master/Microduino_Advanced_Tutorial/MicroduinoTrafficLight MicroduinoTrafficLight]]&lt;br /&gt;
&lt;br /&gt;
==Debugging==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 1: Build the circuit according to the schematic, as follows:&lt;br /&gt;
 [[File:trafficLight1.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 2: Download the code and run after compiling. &lt;br /&gt;
[[File:trafficLight2.png|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Step 3: Function description  &lt;br /&gt;
Here in this example, we simulate two traffic lights and define four circumstances in the code: &lt;br /&gt;
1.When traffic light 1 goes on and the driving lamp blinks, it means “Stop”; At same the time, the second green light in traffic light 2 goes on, it means “Go”. &lt;br /&gt;
&lt;br /&gt;
2.When the red light goes off and the yellow light goes on in traffic light 1, it means “Ready to go”. At the same time, the yellow light in traffic light 2 goes on, meaning “Ready to stop”. &lt;br /&gt;
&lt;br /&gt;
3.When green light in traffic light 1 goes on, it means “Go”. The red light goes on and driving lamp blinks in traffic light 2, it means “Stop“.&lt;br /&gt;
&lt;br /&gt;
4.When the yellow light in traffic light goes on, it means “Read to stop”. Meantime, the red light goes off and yellow light goes on in traffic light 2, it means “Ready to go”. &lt;br /&gt;
&lt;br /&gt;
The variable “duration” in the code defines duration time of each circumstance:  &lt;br /&gt;
&lt;br /&gt;
  int duration[] = {&lt;br /&gt;
      8000,3000,10000,3000}; // duration of each situation&lt;br /&gt;
&lt;br /&gt;
[[File:trafficLight3.jpg|600px|center|thumb]]&lt;br /&gt;
From the crossroads picture above, you can see two traffic lights in this example are in different direction.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
&lt;br /&gt;
Two traffic lights will simulate traffic lights in two directions at the crossroads as well as how they work in real life.  &lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
http://v.youku.com/v_show/id_XODQ5NTcwOTg4.html&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>1304410487@qq.com</name></author>	</entry>

	</feed>