&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Nerves on Frank Kumro</title><link>https://frank.kumro.dev/tags/nerves/</link><description>Recent content in Nerves on Frank Kumro</description><generator>Hugo</generator><language>en</language><copyright>Frank Kumro</copyright><lastBuildDate>Sun, 31 Mar 2019 22:24:30 +0000</lastBuildDate><atom:link href="https://frank.kumro.dev/tags/nerves/index.xml" rel="self" type="application/rss+xml"/><item><title>Building a Gitlab CI light using Elixir/Nerves - Hardware</title><link>https://frank.kumro.dev/posts/2019-03-31-building-a-gitlab-ci-light-using-nerves-hardware/</link><pubDate>Sun, 31 Mar 2019 22:24:30 +0000</pubDate><guid>https://frank.kumro.dev/posts/2019-03-31-building-a-gitlab-ci-light-using-nerves-hardware/</guid><description>&lt;p&gt;It&amp;rsquo;s no secret I am a fan of &lt;a href="https://about.gitlab.com/"&gt;Gitlab&lt;/a&gt; and I thought about ways to utilize their API/callbacks to create a fun project using Elixir/Nerves. Other companies have created their own versions of light based notifications, here&amp;rsquo;s my take on it.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://frank.kumro.dev/images/light-cycle-1.gif" alt="Light Cyle"&gt;&lt;/p&gt;
&lt;h2 id="hardware"&gt;Hardware&lt;/h2&gt;
&lt;p&gt;I am going to use a &lt;a href="https://www.adafruit.com/product/2993"&gt;3 color tower light&lt;/a&gt; from &lt;a href="https://www.adafruit.com/"&gt;Adafruit&lt;/a&gt; to provide the visual aspect of the notification system. It will be controlled by a Raspberry PI Zero W or a Raspberry PI 3, the code can be shared between the two devices. A &lt;a href="https://www.amazon.com/gp/product/B00KTEN3TM/"&gt;4 channel 5v relay board&lt;/a&gt; will control turning the lights on and off via the GPIO. Power to the lamp requires the use of a &lt;a href="https://www.adafruit.com/product/373"&gt;barrel jack&lt;/a&gt; and a &lt;a href="https://www.adafruit.com/product/798"&gt;12v power adapter&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>Building a Raspberry Pi weather station with Elixir/Nerves – Part 5</title><link>https://frank.kumro.dev/posts/2018-06-18-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-5/</link><pubDate>Mon, 18 Jun 2018 15:23:00 +0000</pubDate><guid>https://frank.kumro.dev/posts/2018-06-18-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-5/</guid><description>&lt;h2 id="speaking-at-elixirconf-2018"&gt;Speaking at ElixirConf 2018&lt;/h2&gt;
&lt;p&gt;If you want to learn how to build a weather station, laugh, cry when its over; then come to ElixirConf 2018! You can talk to me in person and I’ll make sure to tell you the wind speed.&lt;/p&gt;
&lt;h2 id="its-alive"&gt;It’s ALIVE&lt;/h2&gt;
&lt;p&gt;To see weather results visit &lt;a href="https://weather.frankkumro.com"&gt;https://weather.frankkumro.com&lt;/a&gt;. Refresh the page every 30 seconds to see the latest weather report.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://frank.kumro.dev/images/part5-1.jpg" alt="Weather station"&gt;&lt;/p&gt;
&lt;h2 id="setting-up-wireless"&gt;Setting up wireless&lt;/h2&gt;
&lt;p&gt;Capturing weather data is useless without saving / displaying it. Lake Effect will send the data it captures to a Phoenix application over HTTPS in JSON format. I did not want to dig a trench to run power/Ethernet to the shed, it is around 100 feet from the house. Life is too short to dig holes for fun! Wireless will be used for connectivity and solar for power (future project). Setting up the wireless connection within Nerves is easy.&lt;/p&gt;</description></item><item><title>Building a Raspberry Pi weather station with Elixir/Nerves – Part 4</title><link>https://frank.kumro.dev/posts/2018-03-26-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-4/</link><pubDate>Mon, 26 Mar 2018 13:37:00 +0000</pubDate><guid>https://frank.kumro.dev/posts/2018-03-26-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-4/</guid><description>&lt;p&gt;Part 3 demonstrated how to communicate with the wind speed sensor. The next step is to create modules for reading from both sensors, and automatically repeating this task at a set interval.&lt;/p&gt;
&lt;p&gt;You will notice two project names in the details below, Lake Effect and Thunder Snow. These are the project names for the code running on the weather station (Lake Effect) and the code that will be running the API/UI for display (Thunder Snow). Currently Thunder Snow is empty, that will change after Part 4.&lt;/p&gt;</description></item><item><title>Building a Raspberry Pi weather station with Elixir/Nerves – Part 3</title><link>https://frank.kumro.dev/posts/2018-01-12-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-3/</link><pubDate>Fri, 12 Jan 2018 17:04:00 +0000</pubDate><guid>https://frank.kumro.dev/posts/2018-01-12-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-3/</guid><description>&lt;p&gt;Part 2 ended without us being able to read the wind speed, let’s fix that!&lt;/p&gt;
&lt;p&gt;&lt;img src="https://frank.kumro.dev/images/wind-speed-hacking.jpeg" alt=""&gt;&lt;/p&gt;
&lt;h2 id="communicating-via-spi-bus"&gt;Communicating via SPI bus&lt;/h2&gt;
&lt;p&gt;To communicate with the wind speed sensor, a binary payload must be sent to the MCP3008 chip over the SPI bus. The &lt;a href="https://github.com/fhunleth/elixir_ale"&gt;elixir_ale&lt;/a&gt; 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 &lt;code&gt;0&lt;/code&gt;, indicated by the top left most pin being used on the chip. Now that the channel is known, the binary payload can be constructed.&lt;/p&gt;</description></item><item><title>Building a Raspberry Pi weather station with Elixir/Nerves – Part 2</title><link>https://frank.kumro.dev/posts/2018-01-09-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-2/</link><pubDate>Tue, 09 Jan 2018 16:52:00 +0000</pubDate><guid>https://frank.kumro.dev/posts/2018-01-09-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-2/</guid><description>&lt;p&gt;&lt;img src="https://frank.kumro.dev/images/oneeternitylater.jpg" alt=""&gt;&lt;/p&gt;
&lt;p&gt;Life happens but I am back with a part 2 update for the Raspberry Pi weather station powered by Elixir/Nerves!&lt;/p&gt;
&lt;h2 id="an-analog-mistake"&gt;An analog mistake&lt;/h2&gt;
&lt;p&gt;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 &lt;a href="http://www.microchip.com/wwwproducts/en/en010530"&gt;MCP3008&lt;/a&gt; analog to digital converter is only &lt;a href="https://www.adafruit.com/product/85"&gt;$3.75 from Adafruit&lt;/a&gt; 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.&lt;/p&gt;</description></item><item><title>Building a Raspberry Pi weather station with Elixir/Nerves – Part 1</title><link>https://frank.kumro.dev/posts/2017-10-16-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-1/</link><pubDate>Mon, 16 Oct 2017 12:39:00 +0000</pubDate><guid>https://frank.kumro.dev/posts/2017-10-16-building-a-raspberry-pi-weather-station-with-elixir-nerves-part-1/</guid><description>&lt;p&gt;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!&lt;/p&gt;
&lt;h2 id="parts-list"&gt;Parts List&lt;/h2&gt;
&lt;p&gt;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.&lt;br&gt;
Adafruit&lt;/p&gt;</description></item></channel></rss>