Commit ec7bcce4 authored by Marcus Greiff's avatar Marcus Greiff

Testing new documentation format

parent 4222f7d1
Pipeline #588 passed with stage
in 27 seconds
div.wy-menu-vertical ul.current li.toctree-l3 a {
font-weight: bold;
}
a.documenter-source {
float: right;
}
.documenter-methodtable pre {
margin-left: 0px;
margin-right: 0px;
margin-top: 0px;
padding: 0px;
}
.documenter-methodtable pre.documenter-inline {
display: inline;
}
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16.5mm"
height="8.6603003mm"
viewBox="0 0 58.464567 30.686103"
id="svg2"
version="1.1"
inkscape:version="0.91 r13725"
sodipodi:docname="arrow.svg">
<defs
id="defs4" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="11.2"
inkscape:cx="14.209234"
inkscape:cy="29.780479"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1920"
inkscape:window-height="1053"
inkscape:window-x="0"
inkscape:window-y="27"
inkscape:window-maximized="1" />
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1021.6761)">
<path
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 0,1021.6761 35.433071,0 -17.716536,30.6861 z"
id="path4140"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
</g>
</svg>
This diff is collapsed.
/*
* Part of Documenter.jl
* https://github.com/JuliaDocs/Documenter.jl
*
* License: MIT
*/
requirejs.config({
paths: {
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min',
'jqueryui': 'https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.0/jquery-ui.min',
'headroom': 'https://cdnjs.cloudflare.com/ajax/libs/headroom/0.9.3/headroom.min',
'mathjax': 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS_HTML',
'highlight': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min',
'highlight-julia': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/julia.min',
'highlight-julia-repl': 'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/languages/julia-repl.min',
},
shim: {
'mathjax' : {
exports: "MathJax"
},
'highlight-julia': ['highlight'],
'highlight-julia-repl': ['highlight'],
}
});
// Load MathJax
require(['mathjax'], function(MathJax) {
MathJax.Hub.Config({
"tex2jax": {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: [
"input/TeX",
"output/HTML-CSS",
"output/NativeMML"
],
extensions: [
"MathMenu.js",
"MathZoom.js",
"TeX/AMSmath.js",
"TeX/AMSsymbols.js",
"TeX/autobold.js",
"TeX/autoload-all.js"
]
});
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
})
require(['jquery', 'highlight', 'highlight-julia', 'highlight-julia-repl'], function($, hljs) {
$(document).ready(function() {
hljs.initHighlighting();
})
})
// update the version selector with info from the siteinfo.js and ../versions.js files
require(['jquery'], function($) {
$(document).ready(function() {
var version_selector = $("#version-selector");
// add the current version to the selector based on siteinfo.js, but only if the selector is empty
if (typeof DOCUMENTER_CURRENT_VERSION !== 'undefined' && $('#version-selector > option').length == 0) {
var option = $("<option value='#' selected='selected'>" + DOCUMENTER_CURRENT_VERSION + "</option>");
version_selector.append(option);
}
if (typeof DOC_VERSIONS !== 'undefined') {
var existing_versions = $('#version-selector > option');
var existing_versions_texts = existing_versions.map(function(i,x){return x.text});
DOC_VERSIONS.forEach(function(each) {
var version_url = documenterBaseURL + "/../" + each;
var existing_id = $.inArray(each, existing_versions_texts);
// if not already in the version selector, add it as a new option,
// otherwise update the old option with the URL and enable it
if (existing_id == -1) {
var option = $("<option value='" + version_url + "'>" + each + "</option>");
version_selector.append(option);
} else {
var option = existing_versions[existing_id];
option.value = version_url;
option.disabled = false;
}
});
}
// only show the version selector if the selector has been populated
if ($('#version-selector > option').length > 0) {
version_selector.css("visibility", "visible");
}
})
})
// mobile
require(['jquery', 'headroom'], function($, Headroom) {
$(document).ready(function() {
var navtoc = $("nav.toc");
$("nav.toc li.current a.toctext").click(function() {
navtoc.toggleClass('show');
});
$("article > header div#topbar a.fa-bars").click(function(ev) {
ev.preventDefault();
navtoc.toggleClass('show');
if (navtoc.hasClass('show')) {
var title = $("article > header div#topbar span").text();
$("nav.toc ul li a:contains('" + title + "')").focus();
}
});
$("article#docs").bind('click', function(ev) {
if ($(ev.target).is('div#topbar a.fa-bars')) {
return;
}
if (navtoc.hasClass('show')) {
navtoc.removeClass('show');
}
});
if ($("article > header div#topbar").css('display') == 'block') {
var headroom = new Headroom(document.querySelector("article > header div#topbar"), {"tolerance": {"up": 10, "down": 10}});
headroom.init();
}
})
})
MathJax.Hub.Config({
"tex2jax": {
inlineMath: [['$','$'], ['\\(','\\)']],
processEscapes: true
}
});
MathJax.Hub.Config({
config: ["MMLorHTML.js"],
jax: [
"input/TeX",
"output/HTML-CSS",
"output/NativeMML"
],
extensions: [
"MathMenu.js",
"MathZoom.js",
"TeX/AMSmath.js",
"TeX/AMSsymbols.js",
"TeX/autobold.js",
"TeX/autoload-all.js"
]
});
MathJax.Hub.Config({
TeX: { equationNumbers: { autoNumber: "AMS" } }
});
/*
* Part of Documenter.jl
* https://github.com/JuliaDocs/Documenter.jl
*
* License: MIT
*/
// parseUri 1.2.2
// (c) Steven Levithan <stevenlevithan.com>
// MIT License
function parseUri (str) {
var o = parseUri.options,
m = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
uri = {},
i = 14;
while (i--) uri[o.key[i]] = m[i] || "";
uri[o.q.name] = {};
uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) {
if ($1) uri[o.q.name][$1] = $2;
});
return uri;
};
parseUri.options = {
strictMode: false,
key: ["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],
q: {
name: "queryKey",
parser: /(?:^|&)([^&=]*)=?([^&]*)/g
},
parser: {
strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,
loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
}
};
requirejs.config({
paths: {
'jquery': 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min',
'lunr': 'https://cdnjs.cloudflare.com/ajax/libs/lunr.js/2.1.3/lunr.min',
'lodash': 'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min',
}
});
var currentScript = document.currentScript;
require(["jquery", "lunr", "lodash"], function($, lunr, _) {
$("#search-form").submit(function(e) {
e.preventDefault()
})
// list below is the lunr 2.1.3 list minus the intersect with names(Base)
// (all, any, get, in, is, which) and (do, else, for, let, where, while, with)
// ideally we'd just filter the original list but it's not available as a variable
lunr.stopWordFilter = lunr.generateStopWordFilter([
'a',
'able',
'about',
'across',
'after',
'almost',
'also',
'am',
'among',
'an',
'and',
'are',
'as',
'at',
'be',
'because',
'been',
'but',
'by',
'can',
'cannot',
'could',
'dear',
'did',
'does',
'either',
'ever',
'every',
'from',
'got',
'had',
'has',
'have',
'he',
'her',
'hers',
'him',
'his',
'how',
'however',
'i',
'if',
'into',
'it',
'its',
'just',
'least',
'like',
'likely',
'may',
'me',
'might',
'most',
'must',
'my',
'neither',
'no',
'nor',
'not',
'of',
'off',
'often',
'on',
'only',
'or',
'other',
'our',
'own',
'rather',
'said',
'say',
'says',
'she',
'should',
'since',
'so',
'some',
'than',
'that',
'the',
'their',
'them',
'then',
'there',
'these',
'they',
'this',
'tis',
'to',
'too',
'twas',
'us',
'wants',
'was',
'we',
'were',
'what',
'when',
'who',
'whom',
'why',
'will',
'would',
'yet',
'you',
'your'
])
// add . as a separator, because otherwise "title": "Documenter.Anchors.add!"
// would not find anything if searching for "add!", only for the entire qualification
lunr.tokenizer.separator = /[\s\-\.]+/
// custom trimmer that doesn't strip @ and !, which are used in julia macro and function names
lunr.trimmer = function (token) {
return token.update(function (s) {
return s.replace(/^[^a-zA-Z0-9@!]+/, '').replace(/[^a-zA-Z0-9@!]+$/, '')
})
}
lunr.Pipeline.registerFunction(lunr.stopWordFilter, 'juliaStopWordFilter')
lunr.Pipeline.registerFunction(lunr.trimmer, 'juliaTrimmer')
var index = lunr(function () {
this.ref('location')
this.field('title')
this.field('text')
documenterSearchIndex['docs'].forEach(function(e) {
this.add(e)
}, this)
})
var store = {}
documenterSearchIndex['docs'].forEach(function(e) {
store[e.location] = {title: e.title, category: e.category}
})
$(function(){
function update_search(querystring) {
tokens = lunr.tokenizer(querystring)
results = index.query(function (q) {
tokens.forEach(function (t) {
q.term(t.toString(), {
fields: ["title"],
boost: 10,
usePipeline: false,
editDistance: 2,
wildcard: lunr.Query.wildcard.NONE
})
q.term(t.toString(), {
fields: ["text"],
boost: 1,
usePipeline: true,
editDistance: 2,
wildcard: lunr.Query.wildcard.NONE
})
})
})
$('#search-info').text("Number of results: " + results.length)
$('#search-results').empty()
results.forEach(function(result) {
data = store[result.ref]
link = $('<a>')
link.text(data.title)
link.attr('href', documenterBaseURL+'/'+result.ref)
cat = $('<span class="category">('+data.category+')</span>')
li = $('<li>').append(link).append(cat)
$('#search-results').append(li)
})
}
function update_search_box() {
querystring = $('#search-query').val()
update_search(querystring)
}
$('#search-query').keyup(_.debounce(update_search_box, 250))
$('#search-query').change(update_search_box)
search_query_uri = parseUri(window.location).queryKey["q"]
if(search_query_uri !== undefined) {
search_query = decodeURIComponent(search_query_uri.replace(/\+/g, '%20'))
$("#search-query").val(search_query)
}
update_search_box();
})
})
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Examples on the BB · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link href="assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="search.html"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="index.html">LabConnections</a></li><li><a class="toctext" href="installation.html">Installation Instructions</a></li><li><a class="toctext" href="systemConfiguration.html">System Configuration (deprecated)</a></li><li><a class="toctext" href="testing.html">Tests</a></li><li class="current"><a class="toctext" href="examples.html">Examples on the BB</a><ul class="internal"><li><a class="toctext" href="#Example-with-LEDs-(BB)-1">Example with LEDs (BB)</a></li><li><a class="toctext" href="#Example-with-GPIOs-(BB)-1">Example with GPIOs (BB)</a></li><li><a class="toctext" href="#Example-with-PWM-(BB)-1">Example with PWM (BB)</a></li><li><a class="toctext" href="#Example-with-SPI-(BB)-1">Example with SPI (BB)</a></li><li><a class="toctext" href="#Example-with-LEDs-(HOST)-1">Example with LEDs (HOST)</a></li></ul></li></ul></nav><article id="docs"><header><nav><ul><li><a href="examples.html">Examples on the BB</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/examples.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Examples on the BB</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Examples-on-the-BB-1" href="#Examples-on-the-BB-1">Examples on the BB</a></h1><p>The following examples may be run from the BB, and may require the user to export the the LabConnections module to the LOAD_PATH manually, executing the following line in the Julia prompt</p><pre><code class="language-none">push!(LOAD_PATH, &quot;/home/debian/juliapackages&quot;)</code></pre><p>When running the examples with hardware in the loop, take caution not to short the BB ground with any output pin, as this will damage the board. For instance, if connecting a diode to the output pins, always use a resistor of &gt;1000 Ohm in parallel. See the configuration page for information on which functionality specific pins support.</p><ul><li><a href="examples.html#Examples-on-the-BB-1">Examples on the BB</a></li><ul><li><a href="examples.html#Example-with-LEDs-(BB)-1">Example with LEDs (BB)</a></li><li><a href="examples.html#Example-with-GPIOs-(BB)-1">Example with GPIOs (BB)</a></li><li><a href="examples.html#Example-with-PWM-(BB)-1">Example with PWM (BB)</a></li><li><a href="examples.html#Example-with-SPI-(BB)-1">Example with SPI (BB)</a></li><li><a href="examples.html#Example-with-LEDs-(HOST)-1">Example with LEDs (HOST)</a></li></ul></ul><h2><a class="nav-anchor" id="Example-with-LEDs-(BB)-1" href="#Example-with-LEDs-(BB)-1">Example with LEDs (BB)</a></h2><p>To test the system LED functionality of the Julia code from the BBB, open a Julia prompt and run the SYS_LED_test.jl file</p><pre><code class="language-none">include(&quot;/home/debian/juliapackages/LabConnections/test/BeagleBone/SYS_LED_test.jl&quot;)</code></pre><p>This example runs a test with hardware in the loop, exporting and unexporting the SYS_LED devices and blinking led D2-D5 in a sequence over 1 second, alternating with D2/D4 and D3/D5 on/off.</p><h2><a class="nav-anchor" id="Example-with-GPIOs-(BB)-1" href="#Example-with-GPIOs-(BB)-1">Example with GPIOs (BB)</a></h2><p>To test the GPIO functionality of the Julia code from the BBB, open a Julia prompt and run the GPIO_test.jl file</p><pre><code class="language-none">include(&quot;/home/debian/juliapackages/LabConnections/test/BeagleBone/GPIO_test.jl&quot;)</code></pre><p>This again runs the tests with the BBB in the loop, testing exception handling exporting of the file system and also runs all the GPIOs on the board high/low at a 0.1 period time over 1 second to demonstrate the IO communication visually.</p><h2><a class="nav-anchor" id="Example-with-PWM-(BB)-1" href="#Example-with-PWM-(BB)-1">Example with PWM (BB)</a></h2><p>To test the PWM functionality of the Julia code from the BBB, open a Julia prompt and run the PWM_test.jl file</p><pre><code class="language-none">include(&quot;/home/debian/juliapackages/LabConnections/test/BeagleBone/PWM_test.jl&quot;)</code></pre><p>This runs the PWM tests with the BBB in the loop, testing exception handling exporting of the file system. In addition, it runs all the PWM pins on the board with a duty cycle of 0.5 over a period time over 1 second to demonstrate the IO communication visually.</p><h2><a class="nav-anchor" id="Example-with-SPI-(BB)-1" href="#Example-with-SPI-(BB)-1">Example with SPI (BB)</a></h2><p>All development on the SPI is currently done in C in a for of the serbus package. Consequently, this example is currently run completely separate from the LabConnections.</p><p>Make sure that the serbus package exists in the /juliapackages/ directory, where it is automatically placed when transferring code to the BB using the ./flash_BB shell script. Then simply run</p><pre><code class="language-none">cp /home/debian/juliapackages/serbus/bb_spi.sh /home/debian</code></pre><p>and execute</p><pre><code class="language-none">./bb_spi.sh</code></pre><p>in the /home/debian/ directory. The program then</p><ol><li><p>Compiles a device tree overlay (should SPI1 be used)</p></li><li><p>Creates the binaries for the SPI driver and example</p></li><li><p>Runs the MCP3903 example script located in spi_MCP3903.c</p></li></ol><p>The purpose of the program is to configure the ADC to operate in the continuous mode and then read the registers, outputting the measurements in the terminal.</p><h2><a class="nav-anchor" id="Example-with-LEDs-(HOST)-1" href="#Example-with-LEDs-(HOST)-1">Example with LEDs (HOST)</a></h2><p>To operate the LEDs from the host computer, simply connect the BBB to the HOST via USB and run the &quot;testLED.jl&quot; on the HOST</p><pre><code class="language-none">cd &amp;&amp; cd .julia/v0.6/LabConnections/Examples/ &amp;&amp; julia testLED.jl</code></pre><pre><code class="language-"></code></pre><footer><hr/><a class="previous" href="testing.html"><span class="direction">Previous</span><span class="title">Tests</span></a></footer></article></body></html>
<a id='Examples-on-the-BB-1'></a>
# Examples on the BB
The following examples may be run from the BB, and may require the user to export the the LabConnections module to the LOAD_PATH manually, executing the following line in the Julia prompt
```
push!(LOAD_PATH, "/home/debian/juliapackages")
```
When running the examples with hardware in the loop, take caution not to short the BB ground with any output pin, as this will damage the board. For instance, if connecting a diode to the output pins, always use a resistor of >1000 Ohm in parallel. See the configuration page for information on which functionality specific pins support.
- [Examples on the BB](examples.md#Examples-on-the-BB-1)
- [Example with LEDs (BB)](examples.md#Example-with-LEDs-(BB)-1)
- [Example with GPIOs (BB)](examples.md#Example-with-GPIOs-(BB)-1)
- [Example with PWM (BB)](examples.md#Example-with-PWM-(BB)-1)
- [Example with SPI (BB)](examples.md#Example-with-SPI-(BB)-1)
- [Example with LEDs (HOST)](examples.md#Example-with-LEDs-(HOST)-1)
<a id='Example-with-LEDs-(BB)-1'></a>
## Example with LEDs (BB)
To test the system LED functionality of the Julia code from the BBB, open a Julia prompt and run the SYS_LED_test.jl file
```
include("/home/debian/juliapackages/LabConnections/test/BeagleBone/SYS_LED_test.jl")
```
This example runs a test with hardware in the loop, exporting and unexporting the SYS_LED devices and blinking led D2-D5 in a sequence over 1 second, alternating with D2/D4 and D3/D5 on/off.
<a id='Example-with-GPIOs-(BB)-1'></a>
## Example with GPIOs (BB)
To test the GPIO functionality of the Julia code from the BBB, open a Julia prompt and run the GPIO_test.jl file
```
include("/home/debian/juliapackages/LabConnections/test/BeagleBone/GPIO_test.jl")
```
This again runs the tests with the BBB in the loop, testing exception handling exporting of the file system and also runs all the GPIOs on the board high/low at a 0.1 period time over 1 second to demonstrate the IO communication visually.
<a id='Example-with-PWM-(BB)-1'></a>
## Example with PWM (BB)
To test the PWM functionality of the Julia code from the BBB, open a Julia prompt and run the PWM_test.jl file
```
include("/home/debian/juliapackages/LabConnections/test/BeagleBone/PWM_test.jl")
```
This runs the PWM tests with the BBB in the loop, testing exception handling exporting of the file system. In addition, it runs all the PWM pins on the board with a duty cycle of 0.5 over a period time over 1 second to demonstrate the IO communication visually.
<a id='Example-with-SPI-(BB)-1'></a>
## Example with SPI (BB)
All development on the SPI is currently done in C in a for of the serbus package. Consequently, this example is currently run completely separate from the LabConnections.
Make sure that the serbus package exists in the /juliapackages/ directory, where it is automatically placed when transferring code to the BB using the ./flash_BB shell script. Then simply run
```
cp /home/debian/juliapackages/serbus/bb_spi.sh /home/debian
```
and execute
```
./bb_spi.sh
```
in the /home/debian/ directory. The program then
1. Compiles a device tree overlay (should SPI1 be used)
2. Creates the binaries for the SPI driver and example
3. Runs the MCP3903 example script located in spi_MCP3903.c
The purpose of the program is to configure the ADC to operate in the continuous mode and then read the registers, outputting the measurements in the terminal.
<a id='Example-with-LEDs-(HOST)-1'></a>
## Example with LEDs (HOST)
To operate the LEDs from the host computer, simply connect the BBB to the HOST via USB and run the "testLED.jl" on the HOST
```
cd && cd .julia/v0.6/LabConnections/Examples/ && julia testLED.jl
```
```@systemConfiguration
```
<a id='Tests-1'></a>
# Tests
The BeagleBone tests can be run on any computer, regrdless of their file-syste. By setting the flag RUNNING_TESTS to true, a dummy file-system is exported in which the tests are run operate. This has the advantage of enabling testing of the code run on the BB free from the BB itself, without building the Debian FS, thereby enabling the automatic testing through Travis.
To run the tests, simply enter the /test/ directory and run
```
julia run_tests.jl
```
If the tests are to be run on the BB with hardware in the loop, run
```
julia run_tests.jl
```
on the BB, to run examples separately, see
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>LabConnections · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link href="assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="search.html"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li class="current"><a class="toctext" href="index.html">LabConnections</a><ul class="internal"></ul></li><li><a class="toctext" href="installation.html">Installation Instructions</a></li><li><a class="toctext" href="systemConfiguration.html">System Configuration (deprecated)</a></li><li><a class="toctext" href="testing.html">Tests</a></li><li><a class="toctext" href="examples.html">Examples on the BB</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href="index.html">LabConnections</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/index.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>LabConnections</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="LabConnections-1" href="#LabConnections-1">LabConnections</a></h1><p>This is the documentation for the LabCommunication project, detailing installation instructions, examples and tests which may be run, as well as documenting the protocols and structure of the IO communication.</p><ul><li><a href="examples.html#Examples-on-the-BB-1">Examples on the BB</a></li><ul><li><a href="examples.html#Example-with-LEDs-(BB)-1">Example with LEDs (BB)</a></li><li><a href="examples.html#Example-with-GPIOs-(BB)-1">Example with GPIOs (BB)</a></li><li><a href="examples.html#Example-with-PWM-(BB)-1">Example with PWM (BB)</a></li><li><a href="examples.html#Example-with-SPI-(BB)-1">Example with SPI (BB)</a></li><li><a href="examples.html#Example-with-LEDs-(HOST)-1">Example with LEDs (HOST)</a></li></ul><li><a href="testing.html#Tests-1">Tests</a></li><li><a href="installation.html#Installation-Instructions-1">Installation Instructions</a></li><ul><li><a href="installation.html#On-the-BBB-1">On the BBB</a></li><li><a href="installation.html#On-the-HOST-1">On the HOST</a></li><li><a href="installation.html#Setting-up-automatic-communication-1">Setting up automatic communication</a></li></ul><li><a href="index.html#LabConnections-1">LabConnections</a></li><li><a href="systemConfiguration.html#System-Configuration-(deprecated)-1">System Configuration (deprecated)</a></li><ul><li><a href="systemConfiguration.html#Configuration-interfaces-(deprecated)-1">Configuration interfaces (deprecated)</a></li><li><a href="systemConfiguration.html#Configuration-files-1">Configuration files</a></li><li><a href="systemConfiguration.html#Creating-configurations-1">Creating configurations</a></li></ul></ul><pre><code class="language-"></code></pre><footer><hr/><a class="next" href="installation.html"><span class="direction">Next</span><span class="title">Installation Instructions</span></a></footer></article></body></html>
<a id='LabConnections.jl-Manual-1'></a>
# LabConnections.jl Manual
<a id='Examples-1'></a>
## Examples
- [Tests](examples/testing.md#Tests-1)
<a id='Guide-1'></a>
## Guide
- [Introduction](man/introduction.md#Introduction-1)
- [Installation Instructions](man/installation.md#Installation-Instructions-1)
<a id='Functions-1'></a>
## Functions
<a id='Documentation-Index-1'></a>
## Documentation Index
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"/><meta name="viewport" content="width=device-width, initial-scale=1.0"/><title>Installation Instructions · LabConnections</title><link href="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css" rel="stylesheet" type="text/css"/><link href="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" type="text/css"/><link href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css" rel="stylesheet" type="text/css"/><script>documenterBaseURL="."</script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js" data-main="assets/documenter.js"></script><script src="siteinfo.js"></script><script src="../versions.js"></script><link href="assets/documenter.css" rel="stylesheet" type="text/css"/></head><body><nav class="toc"><h1>LabConnections</h1><select id="version-selector" onChange="window.location.href=this.value" style="visibility: hidden"></select><form class="search" id="search-form" action="search.html"><input id="search-query" name="q" type="text" placeholder="Search docs"/></form><ul><li><a class="toctext" href="index.html">LabConnections</a></li><li class="current"><a class="toctext" href="installation.html">Installation Instructions</a><ul class="internal"><li><a class="toctext" href="#On-the-BBB-1">On the BBB</a></li><li><a class="toctext" href="#On-the-HOST-1">On the HOST</a></li><li><a class="toctext" href="#Setting-up-automatic-communication-1">Setting up automatic communication</a></li></ul></li><li><a class="toctext" href="systemConfiguration.html">System Configuration (deprecated)</a></li><li><a class="toctext" href="testing.html">Tests</a></li><li><a class="toctext" href="examples.html">Examples on the BB</a></li></ul></nav><article id="docs"><header><nav><ul><li><a href="installation.html">Installation Instructions</a></li></ul><a class="edit-page" href="https://github.com//blob/master/docs/src/installation.md"><span class="fa"></span> Edit on GitHub</a></nav><hr/><div id="topbar"><span>Installation Instructions</span><a class="fa fa-bars" href="#"></a></div></header><h1><a class="nav-anchor" id="Installation-Instructions-1" href="#Installation-Instructions-1">Installation Instructions</a></h1><h2><a class="nav-anchor" id="On-the-BBB-1" href="#On-the-BBB-1">On the BBB</a></h2><p>On the BeagleBone, first flash it with a Debian image for 32 bit ARM processors (BeagleBoard.org Debian Image 2017-03-19) using a micro-SD by following <a href="http://derekmolloy.ie/write-a-new-image-to-the-beaglebone-black/">this guide</a>. You may also include a Julia v0.6 tarball, alternatively transferring it using after an installation.</p><p>If using the provided SD card, flash the BB by holding down S2 for about 5 seconds while connecting the BB to 5V power. Keep the button pressed until the four system LEDs (D2/D3/D4/D5) start blinking in a periodical sequence. Leave the BB alone for 15-20 minutes while flashing, until all four lights are turned off (or on). Power off the BB, remove the SD card, and power it on again.</p><p>Log on to the BB via SSH by</p><pre><code class="language-none">`ssh debian@192.168.7.2&#39;</code></pre><p>an unpack the tarball. Julia should now be operational by running</p><pre><code class="language-none">`/home/debian/julia-&lt;distro specific tag&gt;/bin/julia&#39;</code></pre><p>and before leaving the BB, remove the distibution specific tag by renaming</p><pre><code class="language-none">`mv /home/debian/julia-&lt;distro specific tag&gt;/bin/julia /home/debian/julia/bin/julia&#39;</code></pre><h2><a class="nav-anchor" id="On-the-HOST-1" href="#On-the-HOST-1">On the HOST</a></h2><p>To get started, first install Julia v0.6.X on the PC running a Linux distribution by following the instructions specified <a href="https://github.com/JuliaLang/julia/blob/master/README.md">here</a>. So far, the system has only been tested on Ubuntu 14.04 and 16.04.</p><p>Once Julia is installed, run</p><pre><code class="language-none">`Pkg.clone(https://gitlab.control.lth.se/labdev/LabConnections.jl)&#39;</code></pre><p>in the Julia prompt to install all dependencies on the HOST, the source code is then located in `./julia/v0.6/LabCOnnections&#39;.</p><p>If you plan on working with the SPI devices to debug the ADC/DAC, then you will need a forked <code>serbus&#39; repository which wraps the</code>linux/spi/spidev&#39;. Simply</p><pre><code class="language-none">`cd &amp;&amp; cd .julia/v0.6&#39;
`git clone https://github.com/mgreiff/serbus&#39;</code></pre><p>to get the latest revision of the serbus fork.</p><p>To update the BB with the latest revision of the code, </p><pre><code class="language-none">`cd &amp;&amp; cd .julia/v0.6/LabConnection/util&#39;
`./flash_BB.sh&#39;</code></pre><p>This scripts bundles the current code in LabCOnnections and serbus on the host computer and transfers it to the /home/debian/juliapackages directory on the BB.</p><h2><a class="nav-anchor" id="Setting-up-automatic-communication-1" href="#Setting-up-automatic-communication-1">Setting up automatic communication</a></h2><p>To setup automatic start of Julia server on the BB, make sure to have completed all prior installation instructions, and that the lates revision of the LabConnections package is located on the BB. SSH to the BeagleBone and copy the julilaserver.service to the systemd/system</p><pre><code class="language-none">`ssh debian@192.168.7.2&#39;
`sudo cp -r /home/debian/juliapackets/LabConnections/src/BeagleBone/startup/juliaserver.service /lib/systemd/system/juliaserver.service` (on the BeagleBone)</code></pre><p>Then execute the commands</p><p><code>sudo systemctl enable juliaserver</code> (on the BeagleBone) <code>sudo systemctl start juliaserver</code> (on the BeagleBone)</p><p>After a while, the BeagleBone should start blinking on SysLED 2: on-off-on-sleep-repeat. The server should now start automatically on restart of the BeagleBone, and you should be able to run the examples in in /Examples on the host computer.</p><pre><code class="language-"></code></pre><footer><hr/><a class="previous" href="index.html"><span class="direction">Previous</span><span class="title">LabConnections</span></a><a class="next" href="systemConfiguration.html"><span class="direction">Next</span><span class="title">System Configuration (deprecated)</span></a></footer></article></body></html>
<a id='Installation-Instructions-1'></a>
# Installation Instructions
<a id='On-the-BBB-1'></a>
## On the BBB
On the BeagleBone, first flash it with a Debian image for 32 bit ARM processors (BeagleBoard.org Debian Image 2017-03-19) using a micro-SD by following [this guide](http://derekmolloy.ie/write-a-new-image-to-the-beaglebone-black/). You may also include a Julia v0.6 tarball, alternatively transferring it using after an installation.
If using the provided SD card, flash the BB by holding down S2 for about 5 seconds while connecting the BB to 5V power. Keep the button pressed until the four system LEDs (D2/D3/D4/D5) start blinking in a periodical sequence. Leave the BB alone for 15-20 minutes while flashing, until all four lights are turned off (or on). Power off the BB, remove the SD card, and power it on again.