Difference between revisions of "User Manual/1. Chordata parts/1.1. Microcomputer"

From Chordata documentation
Jump to: navigation, search
(add "change hostname)
m
Line 73: Line 73:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
That will run the notochord using the default <code>Chordata.xml</code> configuration file, which by default reads only one K-Ceptor with a value of ''1'' from the ''JP1'' gate on the Hub.
+
That will run the notochord using the default <code>Chordata.xml</code> configuration file, which by default reads only one K-Ceptor with a value of ''1'' from the ''J1'' gate on the Hub.
  
 
If you want to change the configuration file for the notochord use the <code>-c</code> flag. For example, to read a [[Default_Biped_Configuration]] you can issue:
 
If you want to change the configuration file for the notochord use the <code>-c</code> flag. For example, to read a [[Default_Biped_Configuration]] you can issue:

Revision as of 14:11, 8 April 2019

A Raspberry Pi 3 SBC and the Chordata Hub

We wanted Chordata to be modular and easily extensible, so instead of having a dedicated hardware to do all the sensor readings and data processing, we preferred to implement a device that can be easily found on most electronic laboratories, in which is easy to write and modify software, and is generally powerful enough to take a human being to the moon (if you think we’re exaggerating here, take a look at the specifications of the computer on board of the apollo13 ).

The main software running inside the microcomputer is called Notochord, so by extension we sometimes refer informally to the whole microcomputer as the notochord


SBC and memory card

Meet the modern SBCs: little computers no much bigger than a credit card, that can run a complete operating system with complex applications, and often give you access to regular and low-level peripherals. The most well known of these devices is the Raspberry pi. And this is the platform on which the Chordata system was built and is tested. But if you’re savvy enough, any SCB that exposes an i2c port would work (but part of the configuration might need to be changed). In order to start using Chordata you should get one of those. Chances are that either you already have one, or you have simply always desired to get your hands on them. If the latter is true, go ahead and purchase one. They don’t cost much and it will undoubtedly be an investment that you won’t regret.

The other thing you will need is a micro SD card with at least 2Gb of memory. If you are currently using your SBC for something else, our advice is to get a different SDcard in which to install the Chordata system. That way you can go back to the previous state whenever needed.

Flash the SD card

The software part of the Chordata system is composed of several programs, and most of them should be running on the SBC. We are working on an easier way to get them all, and configure them correctly, by just flashing a custom linux image.

It will be available soon, you can take a look here to see how the process of installing will look like


In order to give your SBC an operating system you have to flash it to your SD card.

The process is really simple using the dedicated tool Etcher, available for windows, mac and linux. Start by downloading from their webpage, and installing it.

  • Download the Raspbian lite image from the official Raspberry downloads page
  • Insert the SD card on your computer’s card reader.
  • On Etcher select the downloaded file, select your SD card as a destination disk and hit Flash!


Wait until the Flash process is finished (it might take a couple of minutes), follow the instructions to unmount the card and voila! you now got a complete working system in your fingertips.

Etcher-gif.gif


If you want to test if it’s working you can put the card on the raspberry, connect it to and HDMI monitor and power it. You should see the init system log displayed, and at the end a prompt asking you to log in (the default credentials are [user:pi, pass:raspberry]. If you don’t have an HDMI monitor, in chapter 1.6 we’ll show you a different method for testing the installation.


Install the Chordata Software

The main software of the Chordata system is the Notochord. During the Beta stage the recommended way to install it is to clone the git repository and compile it. Don't worry if you have never compiled a program yourself, just follow the instructions here!

Log into your Raspbian Lite, you will find yourself on a terminal environment where to issue the following commands (the ones starting with a # are comments to be readed by humans, you can ignore that ones)

#change the hostname
echo notochord | sudo tee /etc/hostname

#Install deps
sudo apt update
sudo apt install i2c-tools libboost-dev libi2c-dev libxml2-utils liboctave-dev scons git vim

#Clone the Notochord repo, and go to the [develop] branch (the one active during Beta-testing period)
git clone https://gitlab.com/chordata/notochord.git
cd notochord
git checkout develop

#Compile a debug build, using 3 cores from your raspberry (attemping to use 4 might result in an out-of-memory error)
scons -j3 debug=1

or, the lazy version is this one-line command:

bash <(curl -sL https://gitlab.com/chordata/notochord/raw/develop/install_notochord.sh)

These scripts are downloading the dependencies to compile and run the Notochord. So you will need an internet connection for the to work.


Run it

After compiling you will find the notochord binary inside the bin folder.

cd bin
./notochord <YOUR COMPUTER'S IP ADDRESS>

That will run the notochord using the default Chordata.xml configuration file, which by default reads only one K-Ceptor with a value of 1 from the J1 gate on the Hub.

If you want to change the configuration file for the notochord use the -c flag. For example, to read a Default_Biped_Configuration you can issue:

./notochord -c ../default_byped.xml <YOUR COMPUTER'S IP ADDRESS>