diff --git a/docs/build/man/development.md b/docs/build/man/development.md index 5670c2571f840a0ba581fd0bcd6a301e0d0cbcd2..0d02f326317d426e78b841c523c18e474b8af117 100644 --- a/docs/build/man/development.md +++ b/docs/build/man/development.md @@ -29,10 +29,32 @@ git pull to ensure that you are working on the correct development branch for Julia v1.0.X. You can now edit the code in `.julia/dev/LabConnections` and run it using a Julia REPL. When you are satisfied with your changes, simply commit and push the changes in the `.julia/dev/LabConnections` directory to the GitLab server. -<a id='Development-with-the-BeagleBone-in-the-loop-1'></a> +<a id='Development-with-the-BeagleBone-1'></a> -## Development with the BeagleBone in the loop +## Development with the BeagleBone -The pin map of the BeagleBone (BB) is shown below. <img src="../fig/beaglebone*black*pinmap.png" height="400" width="700"> When running examples and tests 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 >1 kOhm in parallel. +<a id='Transferring-development-code-from-host-to-the-BeagleBone-1'></a> + +### Transferring development code from host to the BeagleBone + + +Because of the limited performance of the BeagleBone (BB), it is often preferable to do most code development on the host computer. However, you will also do testing of the code locally on the BB, and will thus need to transfer the latest code from the host computer to the BB. To do this, there is a handy utility shell script found in `/util` that handles this. Open a terminal on the host computer and type + + +``` +cd ~/.julia/dev/LabConnections/util +./copyfoldertobb.sh +``` + + +This will transfer the current development version of `LabConnections.jl` found in the `/dev` directory to the BB. + + +<a id='Development-with-hardware-in-the-loop-1'></a> + +### Development with hardware in the loop + + +When testing `LabConnections.jl` with hardware in the loop, the external hardware will be connected to the pin headers on the BB. For reference, the pin map of the BeagleBone (BB) is shown below. <img src="../fig/beaglebone*black*pinmap.png" height="400" width="700"> When running examples and tests 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 >1 kOhm in parallel. diff --git a/docs/src/man/development.md b/docs/src/man/development.md index 5a7f0014ab800317dcdc21e57ee79be6c977d784..61428e6ae473a61ed4cf449444b4cd06f0ce8893 100644 --- a/docs/src/man/development.md +++ b/docs/src/man/development.md @@ -13,7 +13,17 @@ git pull to ensure that you are working on the correct development branch for Julia v1.0.X. You can now edit the code in `.julia/dev/LabConnections` and run it using a Julia REPL. When you are satisfied with your changes, simply commit and push the changes in the `.julia/dev/LabConnections` directory to the GitLab server. -## Development with the BeagleBone in the loop -The pin map of the BeagleBone (BB) is shown below. +## Development with the BeagleBone + +### Transferring development code from host to the BeagleBone +Because of the limited performance of the BeagleBone (BB), it is often preferable to do most code development on the host computer. However, you will also do testing of the code locally on the BB, and will thus need to transfer the latest code from the host computer to the BB. To do this, there is a handy utility shell script found in `/util` that handles this. Open a terminal on the host computer and type +``` +cd ~/.julia/dev/LabConnections/util +./copyfoldertobb.sh +``` +This will transfer the current development version of `LabConnections.jl` found in the `/dev` directory to the BB. + +### Development with hardware in the loop +When testing `LabConnections.jl` with hardware in the loop, the external hardware will be connected to the pin headers on the BB. For reference, the pin map of the BeagleBone (BB) is shown below. <img src="../fig/beaglebone_black_pinmap.png" height="400" width="700"> When running examples and tests 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 >1 kOhm in parallel. diff --git a/util/copy_BB.sh b/util/copy_BB.sh deleted file mode 100755 index 7e6de2452938ddc154cfec674e3e07bfbefc2521..0000000000000000000000000000000000000000 --- a/util/copy_BB.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -#Run in this file un util folder, copies to BB -BLUE='\033[0;34m' -GREEN='\033[0;32m' -RED='\033[0;31m' -NC='\033[0m' -BASEDIR=../$(dirname "$0") - -# store arguments in a special array -args=("$@") -# get number of elements -numberOfArguments=${#args[@]} -echo $ELEMENTS -# echo each element in array -# for loop -#for (( i=0;i<$ELEMENTS;i++)); do -# echo ${args[${i}]} -#done - -if [ ${#args[@]} == 0 ] -then - printf "${RED}ABORTING.${NC} No directory provided\n" -else - for (( i=0;i<$numberOfArguments;i++)); do - if [ -d $BASEDIR/${args[${i}]} ] - then - printf "${GREEN}Copying $BASEDIR/${args[${i}]} to BB${NC}\n" - scp -r $BASEDIR/${args[${i}]} debian@192.168.7.2:/home/debian/juliapackages/LabConnections/${args[${i}]} - else - printf "${RED}ABORTING.${NC} The provided directory $BASEDIR/${args[${i}]} does not exist\n" - fi - done -fi