Skip to content

Part 2. Sensor Time

Rachel edited this page Dec 6, 2016 · 3 revisions

The Matrix is wonderful because it is stuffed full of sensors. On it's lovely circular board you'll find sensors to measure temperature, humidity, pressure, UV, altitude, pitch, yaw, and roll, among other things! You can see everything the Matrix comes with in the diagram below:

> Credit: https://matrix-io.github.io/matrix-documentation/Reference/overview/

I'm going to go over how to read from all of those and then stream it over to a dashboard!

The Matrix Creator offers a couple different ways to interface with it's sensors, but the easiest one based on the current documentation (in my opinion) is the Matrix Abstraction Layer for OS. We installed it already in the previous step, so the service, referred to as "malos" should already be running. You can check with pgrep malos.

You can also quit MALOS with sudo pkill -9 malos. To start it again, just enter malos &. You should see the following output:

Registered driver IMU with port 20013.
Registered driver Humidity with port 20017.
Registered driver Everloop with port 20021.
Registered driver Pressure with port 20025.
Registered driver UV with port 20029.
Registered driver ZigbeeBulb with port 20033.
Registered driver MicArray_Alsa with port 20037.
Registered driver Lirc with port 20041.

You'll notice that each sensor has a particular port number. Temperature is measured with the humidity sensor, orientation with the IMU sensor, and altitude with the pressure sensor.

You can still enter commands in the MALOS environment.

Let's test some sensors!

<< Part 1: Configuring the Pi - Part 2: Using MALOS to Test the Sensors >>