<?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_Ultrasonic_ranging-OLED_display_distance</id>
		<title>Microduino Ultrasonic ranging-OLED display distance - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Microduino_Ultrasonic_ranging-OLED_display_distance"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_Ultrasonic_ranging-OLED_display_distance&amp;action=history"/>
		<updated>2026-04-30T05:33:57Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Microduino_Ultrasonic_ranging-OLED_display_distance&amp;diff=2159&amp;oldid=prev</id>
		<title>Pkj：Created page with &quot;{{Language | Microduino 超声波测距-OLED显示}} {| style=&quot;width: 800px;&quot; |- | ==Objective== This tutorial will teach you using the ultrasonic sensor to measure distance a...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Microduino_Ultrasonic_ranging-OLED_display_distance&amp;diff=2159&amp;oldid=prev"/>
				<updated>2014-04-23T12:59:43Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language | Microduino 超声波测距-OLED显示}} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Objective== This tutorial will teach you using the ultrasonic sensor to measure distance a...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language | Microduino 超声波测距-OLED显示}}&lt;br /&gt;
{| style=&amp;quot;width: 800px;&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
==Objective==&lt;br /&gt;
This tutorial will teach you using the ultrasonic sensor to measure distance and displays on Microduino OLED.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
*'''[[Microduino-Cube-S1]]'''&lt;br /&gt;
*'''[[Microduino-OLED]]'''&lt;br /&gt;
*Other equipment&lt;br /&gt;
**USB cable             one &lt;br /&gt;
**Ultrasonic sensor     one&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
[[File:Microduino超声波OLED显示原理图.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
Refer to UltrasonicOLED&lt;br /&gt;
&lt;br /&gt;
The following is the distance measurement algorithm:&lt;br /&gt;
&lt;br /&gt;
digitalWrite(TrigPin, LOW); //Send a pulse to TrigPin&lt;br /&gt;
&lt;br /&gt;
delayMicroseconds(2);&lt;br /&gt;
&lt;br /&gt;
digitalWrite(TrigPin, HIGH);&lt;br /&gt;
&lt;br /&gt;
delayMicroseconds(10);&lt;br /&gt;
&lt;br /&gt;
digitalWrite(TrigPin, LOW);&lt;br /&gt;
&lt;br /&gt;
cm = pulseIn(EchoPin, HIGH) / 58.0; //Convert the timer to distance (cm) (The propagation of sound speed is 340 m/s)&lt;br /&gt;
&lt;br /&gt;
cm = (int(cm * 100.0)) / 100.0; //Keep two decimal places&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Debug==&lt;br /&gt;
&lt;br /&gt;
Step 1：Stack all the required Microduino module, as follows:&lt;br /&gt;
[[File:Microduino超声波OLED显示连接图.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
Step 2：Compile the program and download it.&lt;br /&gt;
&lt;br /&gt;
Step 3：Run program, put a object in front of sensor, then move it, observe the OLED's value.&lt;br /&gt;
[[File:Microduino超声波OLED显示测距图.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
&lt;br /&gt;
OLED will display the distance between sensor and object.&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
http://v.youku.com/v_show/id_XNzAxMDc5Mjcy.html&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	</feed>