User Manual/1. Chordata parts/1.1. Microcomputer

From Chordata documentation
Jump to: navigation, search
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[edit]

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[edit]

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 Stretch image here (Currently only this version of Raspbian is supported)
  • 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[edit]

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. First of all you have to activate the i2c adaptor on your rPi with this command:

sudo raspi-config

From the menu activate the option under [5 Interfacing options] > [P5 I2C]

After that you can copy-paste these 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

#set the supplicant to connect to a WIFI network
echo -e "\n\
network={ \n\
\tssid=\"Chordata-net\"\n\
\tpsk=\"chordata\"\n\
}" | sudo tee -a /etc/wpa_supplicant/wpa_supplicant.conf
wpa_cli -i wlan0 reconfigure

#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 (which does exactly the same as all the ones above):

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 them to work.


Run it[edit]

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

cd bin
./notochord

If you haven't yet connected the Chordata hardware you will get some error messages, but up to this point the important part is to test if the program runs with no issues.

See this section of the manual to learn how to connect the hardware.