Getting started with Raspberry PI 3, Python and Elixir

Raspberry 3 Model B and SPI (For RFID RC522)

Shortly after finishing the work on our schokotron project I finally had some ideas for playing around with my raspberry pi 3. I think I am going to post the experiments and the code during the next weeks and months. The experiments will be using elixir and python depending on the sensor and available libraries.

Basic Raspberry setup

This setup is based on me using elixir and some SPI experiments. Just do what you need for your task.

  • Install Raspbien: https://www.raspberrypi.org/downloads/
  • Install Erlang, OTP and Elixir: https://www.erlang-solutions.com/blog/installing-elixir-on-a-raspberry-pi-the-easy-way.html

Enable SPI, for example via command line sudo raspi-config or via the desktop raspberry configuration.

SPI issue on Raspberry PI 3 (raspbien jessy)

The first thing I realized when getting started is that a very recent kernel is necessary for some of the SPI based setups. (This is due to some changes to drivers that are not an issue with older versions of the PI.) Thus I will summarize the setup / updates that should be done before using a Raspberry PI 3.

Kernel Update to fix SPI support

Due to some weird hardware workaround, the latest Jessie-image isn’t really working with the bcm2835-drivers and the rc522 RFID reader won’t read any cards without it (see this issue for more details). You can solve that problem by doing the following two things:

Update your Kernel to > 4.14 by running:

sudo apt update
sudo apt upgrade
sudo BRANCH=next rpi-update
reboot

Add the following line to your /boot/config.txt:

dtoverlay=spi0-hw-cs

Dennis Sivia

Dennis Sivia
I am passionate about technology and especially having a lot of fun with functional programming and computer science.

Raspberry Pi 3 Dht11 Lcd

Raspberry PI 3 with dht11 sensor and LCD---In this posts I will try my results of reading a dht11 temperature and humidity sensor and dis...… Continue reading

Elixir, Phoenix 1.3 , Elm and Webpack 3

Published on November 01, 2017

Prettier and Spacemacs

Published on October 31, 2017