<?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=Atmospheric_pressure_data_collection</id>
		<title>Atmospheric pressure data collection - 版本历史</title>
		<link rel="self" type="application/atom+xml" href="http:///https//wiki.microduino.cn/index.php?action=history&amp;feed=atom&amp;title=Atmospheric_pressure_data_collection"/>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Atmospheric_pressure_data_collection&amp;action=history"/>
		<updated>2026-04-22T18:35:57Z</updated>
		<subtitle>本wiki的该页面的版本历史</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>https//wiki.microduino.cn/index.php?title=Atmospheric_pressure_data_collection&amp;diff=2754&amp;oldid=prev</id>
		<title>Pkj：Created page with &quot;{{Language | 大气压数据采集}} {| style=&quot;width: 800px;&quot; |- | ==Objective== This tutorial will use the BM180 air pressure sensor on Microduino-10DOF module and the data w...&quot;</title>
		<link rel="alternate" type="text/html" href="https//wiki.microduino.cn/index.php?title=Atmospheric_pressure_data_collection&amp;diff=2754&amp;oldid=prev"/>
				<updated>2014-05-22T12:48:21Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{Language | 大气压数据采集}} {| style=&amp;quot;width: 800px;&amp;quot; |- | ==Objective== This tutorial will use the BM180 air pressure sensor on Microduino-10DOF module and the data w...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Language | 大气压数据采集}}&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 use the BM180 air pressure sensor on Microduino-10DOF module and the data will display in Processing.&lt;br /&gt;
&lt;br /&gt;
==Equipment==&lt;br /&gt;
*'''[[Microduino-Core]]'''&lt;br /&gt;
*'''[[Microduino-FT232R]]'''&lt;br /&gt;
'''[[Microduino-10DOF]]'''&lt;br /&gt;
*Other equipment&lt;br /&gt;
**USB cable           one  &lt;br /&gt;
&lt;br /&gt;
==Schematic==&lt;br /&gt;
&lt;br /&gt;
Use the Microduino-10DOF module's BMP180 sensor directly.&lt;br /&gt;
&lt;br /&gt;
==Program==&lt;br /&gt;
&lt;br /&gt;
Refers to AtmosphericDataCollection&lt;br /&gt;
&lt;br /&gt;
processingBMP180&lt;br /&gt;
&lt;br /&gt;
==Debug==&lt;br /&gt;
&lt;br /&gt;
Step 1：Set up hardware system, as follows:&lt;br /&gt;
[[File:AtmosphericDataCollectionConnectionDiagram.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
Step 2: Explain the code:&lt;br /&gt;
&lt;br /&gt;
This example needs two parts code, one is Processing and the other is Microduino.&lt;br /&gt;
&lt;br /&gt;
Microduino:&lt;br /&gt;
&lt;br /&gt;
//Get the air pressure data for Processing's display.&lt;br /&gt;
  void vobmp085()&lt;br /&gt;
  {&lt;br /&gt;
    // request pressure (3x oversampling mode, high detail, 23.5ms delay)&lt;br /&gt;
    barometer.setControl(BMP085_MODE_PRESSURE_3);&lt;br /&gt;
    while (micros() - lastMicros &amp;lt; barometer.getMeasureDelayMicroseconds());&lt;br /&gt;
    // read calibrated pressure value in Pascals (Pa)&lt;br /&gt;
    pressure = barometer.getPressure();&lt;br /&gt;
    Serial.println(pressure/1000,3);&lt;br /&gt;
    delay(100);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Processing:&lt;br /&gt;
&lt;br /&gt;
//Get the first seria data&lt;br /&gt;
  // is always my Microduino, so I open Serial.list()[0].&lt;br /&gt;
  // Open whatever port is the one you're using.&lt;br /&gt;
  myPort = new Serial(this, Serial.list()[0], 9600);&lt;br /&gt;
  myPort.bufferUntil('\n'); // Trigger a SerialEvent on new line&lt;br /&gt;
&lt;br /&gt;
//Display the data that Microduino received in screen and mark the table scale.&lt;br /&gt;
  void draw() {&lt;br /&gt;
    background(255);&lt;br /&gt;
    // Draw lines connecting all points&lt;br /&gt;
    for (int i = 0; i &amp;lt; vals.length-1; i++) {&lt;br /&gt;
      stroke(0);&lt;br /&gt;
      strokeWeight(1);&lt;br /&gt;
      line(i, vals[i], i+1, vals[i+1]);&lt;br /&gt;
    }&lt;br /&gt;
    // Slide everything down in the array&lt;br /&gt;
    for (int i = 0; i &amp;lt; vals.length-1; i++) {&lt;br /&gt;
      vals[i] = vals[i+1];&lt;br /&gt;
    }&lt;br /&gt;
    String val = myPort.readStringUntil('\n');&lt;br /&gt;
    if (val != null) {&lt;br /&gt;
      val = trim(val);&lt;br /&gt;
      println(val);&lt;br /&gt;
      pressure=Float.parseFloat(val);&lt;br /&gt;
    }&lt;br /&gt;
    vals[vals.length-1] = 200-pressure;&lt;br /&gt;
    //Display scale&lt;br /&gt;
    text ( &amp;quot;200-&amp;quot;, 370, 10); &lt;br /&gt;
    text ( &amp;quot;--&amp;quot;, 370, 50); &lt;br /&gt;
    text ( &amp;quot;100-&amp;quot;, 370, 100);&lt;br /&gt;
    text ( &amp;quot;--&amp;quot;, 370, 150); &lt;br /&gt;
    text ( &amp;quot;0-&amp;quot;, 370, 200); &lt;br /&gt;
    //show current num&lt;br /&gt;
    text ( pressure+&amp;quot; Kpa&amp;quot;, 0, 10);&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
Step 3: Compile the code and download it.&lt;br /&gt;
&lt;br /&gt;
Step 4: After running, observe the curve on Processing.&lt;br /&gt;
&lt;br /&gt;
==Result==&lt;br /&gt;
&lt;br /&gt;
Screen will display the air pressure data curve, as follows：&lt;br /&gt;
[[File:AtmosphericDataCollectionResult.jpg|600px|center|thumb]]&lt;br /&gt;
&lt;br /&gt;
==Video==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Pkj</name></author>	</entry>

	</feed>