in ,

MATRIX Core Setup – MATRIX Python Programming

What is MATRIX Core?

MATRIX Core is the layer that sandwiches in between the MATRIX OS and the MATRIX HAL. We can make use of MATRIX CORE to query sensors and control any MATRIX Device from any language that supports protocol buffers and 0MQ.
Image result for utsource logo

Sponsor Link

This Project is Sponsored by UTSource. UTSource is a professional electronic components supplier.

Things Needed

  • Raspberry Pi
  • Matrix Device
  • Micro SD Card
  • Active Internet Connection
  • A Power Adapter ( Min 2.3 Amp)
  • Camera (Optional)

Step 1 : Setting Up Raspberry Pi

Download and burn latest Raspbian image to a micro SD card and insert it into the raspberry Pi. Now power it up with a power adapter that can provide at least 2.5 Ampere. Now fire up your terminal and create a password for the user β€˜pi’ by executing the command
sudo passwd pi
Connect your Raspberry Pi to a WiFi router or Wired network and make sure it is connected by checking whether it is getting an IP address from the switch. Now perform and update and upgrade by running
sudo apt update -ysudo apt upgrade -y

Step 2 : Connect MATRIX Device to Raspberry Pi

Now simply align the header pins and slowly connect the MATRIX device to your Raspberry Pi

Step 3 : Adding the key and repository

curl | sudo apt-key add -

echo "deb $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/matrixlabs.list

Step 4 : Perform Update and Upgrade

sudo apt-get update

sudo apt-get upgrade

Step 5 : Installing the MATRIX Software

sudo apt-get install matrixio-malos

sudo reboot

Step 6 : Upgrade MATRIX Core Packages

sudo apt-get update
sudo apt-get upgrade
sudo reboot

Step 7 : Malos Service

Malos runs in the background as a service. To get the Process ID of Malos,
sudo pgrep malos
This will give you the pid. To kill the process,
sudo kill <pid>
sudo pkill -9 malos
To start Malos again,
malos &

Step 8 – Setting Up Python – Clone python examples to your Raspberry Pi

You can either use Java or Python to program in this layer. Here I will be using python. Now start by cloning python examples to your raspberry pi.
git clone;
git submodule update --init;
cd matrix-creator-malos/src/python_test;

Step 9 – Install Python Packages and Dependencies

sudo apt-get install build-essential python-dev
pip install -r requirements.txt

Step 10 – Install MATRIX Core

echo "deb ./" | sudo tee --append /etc/apt/sources.list
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install matrix-creator-init matrix-creator-malos cmake g++ git libzmq3-dev --no-install-recommends


Now go inside the directory and start running python scripts


Rate the Project Did you find this page useful? Help us to improve by rating this page.
MATRIX Core Setup - MATRIX Python Programming
4.4 rating based on 12,345 ratings
Overall rating: 4.4 out of 5 based on 253 reviews.

Written by Jithin

Leave a Reply

Your email address will not be published. Required fields are marked *

MATRIX HAL Setup Raspberry Pi and Demo Scripts

MATRIX Voice Detection PocketSphinx on Raspberry Pi