Slides on a Stick with Raspberry Pi Zero W

If you give presentations often, you will know that one of the biggest headaches is managing slides. You have to figure out software, hardware, and connectors. I’ve usually resorted to bringing a USB thumb drive with my slides in PDF and ODP format, but then I came across an even better idea: the Raspberry Pi Zero W (or RPi0W).
Read more

Raspberry Pi GPIO with Erlang

Raspberry Pis are super cool. One of the neat things about them is that they have a ton of general purpose input/output (GPIO) pins, so you can use them to control all sorts of external devices. Unfortunately, most of the examples and applications are written in Python. I know, a lot of people really love Python, but it’s just not my cup of tea.

Enter the Erlang πGPIO library by Paolo Oliveira! This is a simple, straightforward library that implements the RPi GPIO stuff for Erlang. Using it, I have created an Erlang library to control a 28BYJ-48 5V stepper motor with a ULN2003 controller board.

Check out the library here.

Installing Ansible 2.2.0 on a Raspberry Pi

Ansible is a powerful IT automation tool with lots of modules and active development. Unfortunately, the only version available for stock Raspberry Pi is old. I wanted to use some of the newer modules and features, so I needed to install at least version 2.2. This tutorial will walk you through installing Ansible 2.2.0 on a Raspberry Pi running Raspbian “jessie”. The version of Raspbian I did this on was tagged “2016-09-23”.

Creating a Debian package for Ansible requires a lot of prerequisites, including TeX Live, which can take up almost 2GB of space. If you don’t want to do this yourself, you can try downloading the Ansible package I built. It might be old by the time you read this, though!

Install Prerequisite Packages

Log into the terminal of your Raspberry Pi and run the following command to install the required packages.

sudo apt install asciidoc devscripts python-dev libffi-dev libssl-dev cdbs sshpass -y

Download and Prepare the Ansible Repo

Ansible is available for download from GitHub. Use the following commands to retrieve the Ansible source code and modules.

git clone git://github.com/ansible/ansible.git --recursive
cd ansible/

Use these commands as a guide to select and checkout a stable Ansible release. The list of tags should give you clues as to which tag is the latest and not a development version.

git tag -l
git checkout v2.2.0.0-1
make deb

Your new .deb package will be located in ./deb-build/unstable/. You can install it with the dpkg command like this.

sudo dpkg -i ./deb-build/unstable/ansible_2.2.0.0-100.git201611010320.cdec853.HEAD~unstable_all.deb

Using the Newest Ansible Features

My goal was to use Ansible on my Raspberry Pi to implement my poor-man’s dynamic DNS solution. However, you might also want to use your RPi as a centralized Ansible hub to control a cluster like the Raspberry Pi Dramble. Also consider checking out the ansible-simple-slurm-cluster repo on GitHub for more ideas.

Let me know how you’re using Ansible on your Raspberry Pi in the comments!