Projects update: add Obsolete flag
[beagleboard.org.git] / db / 2798.xml
blobb859ab4a22deea2ba7fc35b0f4376d5c1283a5ea
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="2798" name="educationalBoosterPack" prototype="Page" created="1372101647469" lastModified="1372256107610">
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>educationalBoosterPack</uri>
10     <http_browser>Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.116 Safari/537.36</http_browser>
11     <time type="date">26.06.2013 09:15:07 CDT</time>
12     <hopsession>127.0.0.12.7.236.1tmoumlyxjrzy</hopsession>
13     <body>&lt;script src=&quot;/static/bonescript-demo.js&quot;&gt;&lt;/script&gt;\r
14 &lt;div id=&apos;side-menu&apos; class=&quot;t3_sidebar&quot;&gt;\r
15     &lt;ul class=&quot;left-menu&quot;&gt;&lt;strong&gt;Navigation&lt;/strong&gt;\r
16         &lt;li&gt;&lt;a href=&quot;/static/side-menu.html&quot;&gt;Menu contents&lt;/a&gt;&lt;/li&gt;\r
17     &lt;/ul&gt;\r
18 &lt;/div&gt;\r
19 &lt;div class=&quot;t3_content_1&quot;&gt;&lt;div id=&apos;connect-status&apos;&gt;&lt;/div&gt;&lt;div id=&quot;content_child&quot;&gt;\r
20 &lt;h1&gt;Educational BoosterPack demo&lt;/h1&gt;\r
21 &lt;p&gt;The Educational BoosterPack is a daughterboard for the TI Launchpad\r
22     low-cost development boards.  The BeagleBone LaunchPad Cape is an adapter\r
23     board that works with the BeagleBone to enable connections to BoosterPacks.\r
24     More information about both boards is provided at the links below.  This\r
25     page provides a demo that can be run with recent versions of BoneScript\r
26     provided on BeagleBone.\r
27 &lt;/p&gt;\r
28 &lt;ul&gt;\r
29     &lt;li&gt;&lt;a href=&quot;http://forum.beaglefu.com/topic/49-beaglebone-launchpad-cape/&quot;&gt;\r
30         BeagleBone LaunchPad Cape\r
31     &lt;/a&gt;&lt;/li&gt;\r
32     &lt;li&gt;&lt;a href=&quot;http://embeddedcomputing.weebly.com/educational-boosterpack.html&quot;&gt;\r
33         Educational BoosterPack\r
34     &lt;/a&gt;&lt;/li&gt;\r
35 &lt;/ul&gt;\r
36 &lt;p&gt;\r
37     To run the below demo code, you need an installation of BoneScript 0.2 or\r
38     newer.  Simply put your BeagleBone on the network and you should be able to\r
39     get a connection.  If it is plugged in via USB to your computer, it should\r
40     connect automatically.  If it is elsewhere on the network, you will need to\r
41     input your IP address in the dialog box above and press ENTER.  Once you\r
42     have a connection, click run.  To halt the code, refresh the browser page\r
43     as the code is actually running within the browser page and sending messages\r
44     to your board at each of the BoneScript library calls.\r
45 &lt;/p&gt;\r
46 &lt;p&gt;\r
47     To have this code run on start-up, start the Cloud9 IDE and paste the code\r
48     into the editor.  Then, save the file and drag it into the &apos;autorun&apos; folder.\r
49     To stop it from executing, pull it out of the &apos;autorun&apos; folder.\r
50 &lt;/p&gt;\r
51 &lt;img src=&quot;/static/images/black-emmc-and-hdmi-pins.png&quot; width=&quot;40%&quot; align=&quot;right&quot; /&gt;\r
52 &lt;p&gt;&lt;small&gt;\r
53     &lt;em&gt;Note:&lt;/em&gt; Currently the J3 and J4 headers are not populated on the\r
54     BeagleBone LaunchPad Cape.  If J3 is populated, the BoosterPack could\r
55     actually damage BeagleBone, because the analog signals would be at too\r
56     high a voltage level.  The designer &lt;i&gt;should&lt;/i&gt; perform voltage level\r
57     translation on future revisions.&lt;br /&gt;\r
58     &lt;em&gt;Note:&lt;/em&gt; Some of the pins are connected at places used by the eMMC on\r
59     BeagleBone Black.  These connections &lt;i&gt;should&lt;/i&gt; be moved by the\r
60     designer on future revisions to unused pins.&lt;br /&gt;\r
61     &lt;em&gt;Note:&lt;/em&gt; The BeagleBone LaunchPad Cape does not include an EEPROM for\r
62     indentification by BeagleBone. This means that it cannot be detected.  The\r
63     designer &lt;i&gt;should&lt;/i&gt; include a cape EEPROM on future revisions.\r
64 &lt;/small&gt;&lt;/p&gt;\r
65 &lt;h2&gt;Demo code\r
66     &lt;button class=&quot;dynlink&quot; onclick=&quot;demoRun(&apos;code&apos;)&quot;&gt;run&lt;/button&gt;\r
67     &lt;button class=&quot;dynlink&quot; onclick=&quot;demoRestore(&apos;code&apos;)&quot;&gt;restore&lt;/button&gt;\r
68 &lt;/h2&gt;\r
69 &lt;div id=&apos;console-output&apos; style=&apos;height:300px;&apos;&gt;&lt;/div&gt;\r
70 &lt;pre id=&apos;code&apos; class=&apos;use-editor&apos; style=&apos;height:1200px;&apos;&gt;\r
71 // Please see http://beagleboard.org/Support/bone101/#headers\r
72 // and scroll down for pins used by the eMMC and HDMI.\r
73 var b=require(&apos;bonescript&apos;);\r
74 var LED_RED=&apos;P9_25&apos;;\r
75 var LED_GREEN=&apos;P9_27&apos;;\r
76 var LED_BLUE=&apos;P8_3&apos;; // Cannot be used when eMMC not in reset\r
77 var SPKR=&apos;P9_16&apos;;\r
78 var LCD_CLK=&apos;P9_22&apos;;\r
79 var LCD_DATA=&apos;P9_18&apos;;\r
80 var LCD_RESET=&apos;P8_4&apos;; // Cannot be used when eMMC not in reset\r
81 b.pinMode(LED_RED, b.OUTPUT);\r
82 b.pinMode(LED_GREEN, b.OUTPUT);\r
83 b.pinMode(SPKR, b.OUTPUT);\r
84 doSpkrOn();\r
85 function doSpkrOn() {\r
86     console.log(&apos;Playing 440Hz square wave on speaker&apos;);\r
87     b.analogWrite(SPKR, 0.5, 440, onSpkrOn);\r
88 }\r
89 function onSpkrOn(x) {\r
90     console.log(&apos;Waiting .1 second&apos;);\r
91     setTimeout(doSpkrOff, 100);\r
92 }\r
93 function doSpkrOff() {\r
94     console.log(&apos;Halting speaker&apos;);\r
95     b.analogWrite(SPKR, 0, 440, onSpkrOff);\r
96 }\r
97 function onSpkrOff(x) {\r
98     doRedHigh();\r
99 }\r
100 function doRedHigh() {\r
101     console.log(&apos;Setting LED_RED high&apos;);\r
102     b.digitalWrite(LED_RED, b.HIGH, onRedHigh);\r
104 function onRedHigh(x) {\r
105     console.log(&apos;Waiting 1 second&apos;);\r
106     setTimeout(onRedTimeout, 1000);\r
108 function onRedTimeout() {\r
109     console.log(&apos;Setting LED_RED low&apos;);\r
110     b.digitalWrite(LED_RED, b.LOW, onRedLow);\r
112 function onRedLow() {\r
113     doGreenHigh();\r
115 function doGreenHigh() {\r
116     console.log(&apos;Setting LED_GREEN high&apos;);\r
117     b.digitalWrite(LED_GREEN, b.HIGH, onGreenHigh);\r
119 function onGreenHigh() {\r
120     console.log(&apos;Waiting 1 second&apos;);\r
121     setTimeout(onGreenTimeout, 1000);\r
123 function onGreenTimeout() {\r
124     console.log(&apos;Setting LED_GREEN low&apos;);\r
125     b.digitalWrite(LED_GREEN, b.LOW, onGreenLow);\r
127 function onGreenLow() {\r
128     doSpkrOn();\r
130 &lt;/pre&gt;\r
131 </body>
132     <pseudoparent idref="2471" prototyperef="Page"/>
133     <http_referer>http://beagleboard.org/support/BoneScript/educationalBoosterPack/edit</http_referer>
134     <http_host>beagleboard.org</http_host>
135     <user>jkridner@gmail.com</user>
136     <lang>en-us</lang>
137   </hopobject>
138 </xmlroot>