Building a Raspberry Pi weather station with Elixir/Nerves – Part 3
Part 2 ended without us being able to read the wind speed, let’s fix that!

Communicating via SPI bus
To communicate with the wind speed sensor, a binary payload must be sent to the MCP3008 chip over the SPI bus. The elixir_ale library will be used, as it supports SPI. The first step was to determine what channel the wind speed sensor is wired to. For my setup, that is channel 0, indicated by the top left most pin being used on the chip. Now that the channel is known, the binary payload can be constructed.
Building a Raspberry Pi weather station with Elixir/Nerves – Part 2

Life happens but I am back with a part 2 update for the Raspberry Pi weather station powered by Elixir/Nerves!
An analog mistake
After the parts arrived, I began to pour over the schematics for each device. Only then did I realized the wind sensor was analog, but the Raspberry Pi did not support analog inputs. Digital vs analog is a topic I never thought of, being naive in the hardware world, but it was an easy fix. The MCP3008 analog to digital converter is only $3.75 from Adafruit and shipping will most likely cost more than the part. Make sure to pick one up if you are following along with your initial order.
…Deploying git tags on Nanobox
I’ve been using Nanobox for months now on my side projects, it is an amazing tool for dev(s)/teams that are solo or want to avoid devops work. One item that I miss from my devops days, was the ability to deploy based on a git tag. Being able to checkout the code that currently lives on production, at any time, saves a lot of headaches when it hits the fan.
…Building a Raspberry Pi weather station with Elixir/Nerves – Part 1
My house is at the top of a hill, and no weather stations are close enough to accurately determine the wind speeds. Being the nerd that I am, knowing the current and historical wind speeds is something I would love to play with. I am most interested in the wind speeds during storms. Being able to use Elixir to build this project makes it even more fun!
Parts List
I sourced parts from Adafruit and Amazon. The smoke case and power supply that I planned on purchasing were out of stock. Begrudgingly I had to order a different case and use Amazon for the SD card/power supply. Adafruits pricing for SD cards couldn’t compete with Amazon.
Adafruit
Learning Elixir – August 2017 Update
Learning a new programming language is an investment in time and money (if you purchase learning material). Sometimes a job forces you to learn a new language in order to be productive and to do your job. My personal preference is to learn a new language without the pressures of instant productivity, this is the route I took when I wanted to learn Elixir.
Attempt #1
I first attempted to learn Elixir in Q4 of 2015, but my schedule (lack there of) didn’t allow me the time I needed for deep learning. About two months ago I decided to go all in and start learning Elixir again. This time I would learn the language first, and then any frameworks I deemed necessary. Previously I opened up Programming Phoenix and tried to pick up the language as I went. I feel this approach does a disservice to Elixir, as it is such a powerful language even without frameworks. I briefly tried to read through Programming Elixir but I couldn’t find the time to commit.
…Install Rescuetime on Solus Linux
If you use a linux distribution which cannot install .deb or .rpm packages, Rescuetime appears to be unusable. Solus Linux cannot install either of those packages, and the developer I reached out to at Rescuetime didn’t quite know why I wanted a .tar.gz (or insert your fav compression algo here). I decided to find out if the binaries contained within the .deb file could run on a Solus Linux system. It was a success, and here is how you can do it.
Running Hugo on Nanobox for local dev
My previous post helped those running Solus Linux to install the Nanobox client, now it’s time to do some work! This blog is a static site generated by Hugo, let’s move that over to Nanobox so we don’t have to touch a server again. Check out their new pricing, I won’t be managing servers any more if I can help it!
Setup
In order to use hugo it first must be installed, this can be accomplished within the boxfile.yml file.
Running Nanobox on Solus Linux
Managing the servers that your application(s) run on is enjoyable to some. I’ve automated server provisioning, deployments, backups, etc. using Ansible but it’s not enjoyable in the same way as building applications. From reading Start Small, Stay Small: A Developer’s Guide to Launching a Startup, I learned that tasks which can be outsourced, should be outsourced. Can you manage the infrastructure? Sure, but then you won’t be creating value within your application. Enter Nanobox…
…Setting up Gitlab CI for Elixir/Phoenix on your VPS
Gitlab is a great development tool, getting better with every release. They give you access to their new-ish pipelining features on Gitlab.com for free. However, I wanted to setup the Gitlab Runner (this is what executes your CI build) on my own VPS using Docker. Gitlab makes this very easy to install, but the documentation is spread out when it comes to setup and execution. I thought an all in one document showing all the steps would be helpful to the community.
…Leaking the `Dragster` name
When I was in High School, I was a roller coaster enthusiast (and still am, only with less time to visit parks). Cedar Point is my favorite park, and I would make the 4 hour trip (each way) monthly. On one particular trip, my father and friend joined, and the timing was right to see the results of a recent delivery…roller coaster track!
The track was located on a dirt stretch behind Mean Steak, no barriers or signs indicating that we shouldn’t stop and look. After a few hours in the park we walked over to take pictures, it was amazing to see the track up close. When you look at a completed coaster, you don’t realize how large the track actually is. I snapped 28 pictures before seeing that a box had some paper on it, right away a packing slip shot into my mind! Quickly I snapped 2 more pictures, not knowing if they would even be in focus enough to read.
…