Log updates
[beagleboard.org.git] / db / 2784.xml
blobfeff54e7f2a7a9ef571529ed00a4ad724efa3e14
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <?xml-stylesheet type="text/xsl" href="helma.xsl"?>
3 <xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
4   <hopobject id="2784" name="demo_bmp085" prototype="Page" created="1371825704153" lastModified="1372431844897">
5   <hop:parent idref="2471" prototyperef="Page"/>
6     <is_xhtml type="boolean">true</is_xhtml>
7     <http_remotehost>127.0.0.1</http_remotehost>
8     <http_language>en-US,en;q=0.8</http_language>
9     <uri>demo_bmp085</uri>
10     <http_browser>Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.63 Safari/537.36</http_browser>
11     <time type="date">28.06.2013 10:04:04 CDT</time>
12     <hopsession>127.0.0.192.91.66.fixmuszxsad7</hopsession>
13     <body>&lt;script src=&quot;/static/bonescript-demo.js&quot;&gt;&lt;/script&gt;\r
14 &lt;h2&gt;BoneScript&lt;/h2&gt;\r
16     &lt;div id=&apos;side-menu&apos; class=&quot;t3_sidebar&quot;&gt;\r
17      &lt;ul class=&quot;left-menu&quot;&gt;\r
18       &lt;strong&gt;Navigation&lt;/strong&gt;\r
19       &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/menu/&quot;&gt;Menu contents&lt;/a&gt;&lt;/li&gt;\r
20      &lt;/ul&gt;\r
21     &lt;/div&gt;\r
22     &lt;div class=&quot;t3_content_1&quot;&gt;\r
23      &lt;div id=&apos;connect-status&apos;&gt;&lt;/div&gt;\r
24      &lt;div id=&quot;content_child&quot;&gt;\r
25      &lt;!--- START CONTENT --&gt;\r
27 &lt;h1&gt;Demo: BMP085 I2C Pressure/Temperature Sensor&lt;/h1&gt;\r
28 &lt;p&gt;The BMP085 is a readily available pressure/temperature sensor using I2C.  It is directly supported by the Linux\r
29 kernel, so all you have to do is ask the kernel to load the driver and then start reading values.&lt;/p&gt;\r
30 &lt;h2&gt;Demo\r
31  &lt;button class=&quot;dynlink&quot; onclick=&quot;demoRun(&apos;code&apos;)&quot;&gt;run&lt;/button&gt;\r
32  &lt;button class=&quot;dynlink&quot; onclick=&quot;demoRestore(&apos;code&apos;)&quot;&gt;restore&lt;/button&gt;\r
33 &lt;/h2&gt;\r
34 &lt;pre id=&quot;code&quot; class=&quot;use-editor&quot; style=&quot;height: 160px;&quot;&gt;\r
35 var b = require(&apos;bonescript&apos;);\r
36 var i2c = &apos;/sys/class/i2c-adapter/i2c-1/&apos;;\r
38 b.writeTextFile(i2c + &apos;new_device&apos;, &apos;bmp085 0x77&apos;, printData);\r
39 b.readTextFile(i2c + &apos;1-0077/temp0_input&apos;, printData);\r
40 function printData(data) {\r
41  console.log(JSON.stringify(data));\r
42 }&lt;/pre&gt;\r
43 &lt;div readonly id=&apos;console-output&apos; style=&apos;height: 80px;&apos;&gt;&lt;/div&gt;\r
44 &lt;h2&gt;Build and execute instructions&lt;/h2&gt;\r
45 &lt;img align=&quot;right&quot; height=&quot;500px&quot; src=&quot;http://beagleboard.org/static/uploads/BMP.png&quot;/&gt;\r
47 &lt;!---/static/images/beaglebone_with_bmp085_bb.png --&gt;\r
48 &lt;ul&gt;\r
49  &lt;li&gt;Disconnect your board from power (including USB)&lt;/li&gt;\r
50  &lt;li&gt;Connect BMP085 GND to P9_1&lt;/li&gt;\r
51  &lt;li&gt;Connect BMP085 VCC to P9_3&lt;/li&gt;\r
52  &lt;li&gt;Connect BMP085 SCL to P9_19&lt;/li&gt;\r
53  &lt;li&gt;Connect BMP085 SDA to P9_20&lt;/li&gt;\r
54  &lt;li&gt;Reapply power and refresh this page before running the demo code&lt;/li&gt;\r
55 &lt;/ul&gt;\r
56 &lt;h2&gt;See also&lt;/h2&gt;\r
57 &lt;h3&gt;Topics&lt;/h3&gt;\r
58 &lt;ul&gt;\r
59  &lt;li&gt;&lt;a href=&quot;/Support/bone101/#headers&quot;&gt;BeagleBone expansion headers&lt;/a&gt;&lt;/li&gt;\r
60 &lt;/ul&gt;\r
61 &lt;h3&gt;Related functions&lt;/h3&gt;\r
62 &lt;ul&gt;\r
63  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/#require&quot;&gt;require&lt;/a&gt;&lt;/li&gt;\r
64  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/readTextFile/&quot;&gt;readTextFile&lt;/a&gt;&lt;/li&gt;\r
65  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/writeTextFile/&quot;&gt;writeTextFile&lt;/a&gt;&lt;/li&gt;\r
66 &lt;/ul&gt;\r
67 &lt;h3&gt;Examples&lt;/h3&gt;\r
68 &lt;ul&gt;\r
69  &lt;li&gt;&lt;a href=&quot;/Support/BoneScript/demo_bmp085_graphing/&quot;&gt;BMP085 pressure/temperature\r
70   sensor graphing&lt;/a&gt;&lt;/li&gt;\r
71 &lt;/ul&gt;\r
73      &lt;!--- START FOOTER --&gt;\r
74      &lt;/div&gt;\r
75     &lt;/div&gt;\r
76     &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;</body>
77     <pseudoparent idref="2471" prototyperef="Page"/>
78     <http_referer>http://beagleboard.org/support/BoneScript/demo_bmp085/edit</http_referer>
79     <http_host>beagleboard.org</http_host>
80     <user>cortezjuanjr@gmail.com</user>
81     <lang>en-us</lang>
82   </hopobject>
83 </xmlroot>