1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
4 <title>MCTX3420 Web Interface</title>
5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7 <script language="javascript" type="text/javascript" src="static/excanvas.min.js"></script>
9 <script type="text/javascript" src="static/jquery-1.10.1.min.js"></script>
10 <script type="text/javascript" src="static/jquery.flot.min.js"></script>
11 <script type="text/javascript" src="static/base64.js"></script>
12 <script type="text/javascript" src="static/mctx.gui.js"></script>
13 <script type="text/javascript" src="static/mctx.pintest.js"></script>
15 <link rel="stylesheet" type="text/css" href="static/style.css">
16 <link rel="stylesheet" type="text/css" href="static/nav-menu.css">
17 <script type="text/javascript">
18 runBeforeLoad().done(function () {
19 //Ensure stuff is unloaded before leaving the page
20 $(window).unload(function(){
21 $("#adc-controls").find("input[type='checkbox']")
23 if ($(this).is(":checked")) {
24 $(this).trigger("click");
27 $("#gpio-container").find("input[name='unexport']")
29 $(this).trigger("click");
31 $("#pwm-container").find("input[name='unexport']")
33 $(this).trigger("click");
37 $(document).ready(function () {
39 var name = " " + (mctx.friendlyName ? mctx.friendlyName : "");
40 $("#welcome-container").text("Welcome"+ name + "!");
41 $("#content").css("display", "block");
43 $("#logout").click(function () {
44 $("#logout").logout();
47 $("#gpio-menu").populateDropdown(mctx.pintest.gpios, "GPIO ");
48 $("#pwm-menu").populateDropdown(mctx.pintest.pwms, "PWM ");
50 $("#gpio-go").click(function () {
51 if ($("#gpio-menu").val()) {
52 $("#gpio-container").exportGPIO($("#gpio-menu"));
55 $("#pwm-go").click(function () {
56 if ($("#pwm-menu").val()) {
57 $("#pwm-container").exportPWM($("#pwm-menu"));
60 $("#adc-controls").trigger("reset").setADCControl();
62 $("#errorlog").setErrorLog();
72 <a href="http://www.uwa.edu.au/" target="_blank">
73 <img alt = "The University of Western Australia"
74 src="static/uwacrest-text.png">
76 <span id="title">BBB Pin test (debug only)</span>
79 <div id="menu-container" class="nav-menu">
81 <span id="welcome-container">
84 <script type="text/javascript">getDate();</script>
86 <div id="logout-container">
89 <input type="button" id="logout" value="Logout">
94 <div class="clear"></div>
101 <div class="title">Info</div>
102 <p>This test page gives control over the BBB's pins.
103 Select a pin that you wish to use from the relevant drop-down
104 menu and click 'Go'.</p>
105 <p>A new widget will appear with controls relevant to that pin.</p>
106 <p>Make sure to check the error log to see if something goes wrong.</p>
109 <div class="title">Pin out diagram</div>
110 <p>To see the pin out diagram of the BBB, click <a href="pinout-table.pdf" target="_blank">here</a>.</p>
113 <div class="title">Export/Unexport?</div>
115 To export/unexport a pin means to enable/disable it. Apart from the obvious
116 use case, sometimes this can be required if you use two PWM channels
117 that share the same frequency base.
120 You won't be able to change
121 the frequency until you unexport one of them.
125 <div class="title">PWM explained</div>
126 <p>The frequency must be a decimal number greater than 0.</p>
128 The duty cycle describes the proportion of off/on time per period.
129 This number is specified as a ratio, with values ranging from 0 to 1.
132 The polarity determines if the duty represents the 'active
133 high' or 'active low' portion. By default, the duty cycle
134 represents the 'active high' portion.
142 <div class="title">Dashboard</div>
146 GPIO <select id="gpio-menu"></select>
147 <input type="button" id="gpio-go" value="Go">
150 PWM <select id="pwm-menu"></select>
151 <input type="button" id="pwm-go" value="Go">
156 <div class="sub-title">Error log</div>
157 <textarea id="errorlog" wrap="off" rows="4" cols="30" readonly></textarea>
161 <div class="title">Analogue input (ADC)</div>
162 <form class="controls" action="#" id="adc-controls">
163 <table class="centre">
165 <td>AIN</td><th>0</th><th>1</th><th>2</th><th>3</th>
166 <th>4</th><th>5</th><th>6</th><th>7</th>
170 <td><input name="0" type="text" readonly></td>
171 <td><input name="1" type="text" readonly></td>
172 <td><input name="2" type="text" readonly></td>
173 <td><input name="3" type="text" readonly></td>
174 <td><input name="4" type="text" readonly></td>
175 <td><input name="5" type="text" readonly></td>
176 <td><input name="6" type="text" readonly></td>
177 <td><input name="7" type="text" readonly></td>
181 <td><input name="0" type="checkbox"></td>
182 <td><input name="1" type="checkbox"></td>
183 <td><input name="2" type="checkbox"></td>
184 <td><input name="3" type="checkbox"></td>
185 <td><input name="4" type="checkbox"></td>
186 <td><input name="5" type="checkbox"></td>
187 <td><input name="6" type="checkbox"></td>
188 <td><input name="7" type="checkbox"></td>
194 <div class="widget" id="gpio-container">
195 <div class="title">GPIO controls</div>
198 <div class="widget" id="pwm-container">
199 <div class="title">PWM controls</div>
202 <!-- End main content -->