&lt;?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Elixir on Frank Kumro</title><link>https://frank.kumro.dev/tags/elixir/</link><description>Recent content in Elixir on Frank Kumro</description><generator>Hugo</generator><language>en</language><copyright>Frank Kumro</copyright><lastBuildDate>Wed, 19 Feb 2020 23:11:04 +0000</lastBuildDate><atom:link href="https://frank.kumro.dev/tags/elixir/index.xml" rel="self" type="application/rss+xml"/><item><title>Deploy Elixir apps utilizing Rust NIFs on Render.com</title><link>https://frank.kumro.dev/posts/2020-02-19-using-docker-to-deploy-elixir-rust-nifs-on-render-com/</link><pubDate>Wed, 19 Feb 2020 23:11:04 +0000</pubDate><guid>https://frank.kumro.dev/posts/2020-02-19-using-docker-to-deploy-elixir-rust-nifs-on-render-com/</guid><description>&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: Rust should now be included in the default Elixir install for Render.com. I&amp;rsquo;ll be leaving this blog post online to act as a resource for building elixir + rust docker containers agnostic of Render.com.&lt;/p&gt;
&lt;p&gt;After a long week of dealing with servers at my day job I had no urge to do the same with my side projects. I looked at Render.com and decided to try them out. All was well until I decided to add a mix package that built a Rust NIF. The default build container used by Render for Elixir projects didn&amp;rsquo;t include Rust but after chatting with their team on Slack I came up with a solution, Docker.&lt;/p&gt;</description></item><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>ElixirConf 2018 was amazing</title><link>https://frank.kumro.dev/posts/2018-09-17-elixirconf-2018-was-amazing/</link><pubDate>Mon, 17 Sep 2018 22:33:00 +0000</pubDate><guid>https://frank.kumro.dev/posts/2018-09-17-elixirconf-2018-was-amazing/</guid><description>&lt;p&gt;The cramped 6.5-hour flight to Seattle was worth being uncomfortable for the remainder of the night as ElixirConf 2018 was a truly great event. I experienced two major firsts: speaking and the hallway track. Chris McCord dropped Phoenix.LiveView, Boyd Multerer released Scenic and I am already drinking the kool-aid.&lt;/p&gt;
&lt;p&gt;I mention a few talks below but I wanted to point out there are many more. Please visit the &lt;a href="https://www.youtube.com/channel/UC0l2QTnO1P2iph-86HHilMQ/videos"&gt;ElixirConf Youtube Channel&lt;/a&gt; to view more.&lt;/p&gt;</description></item><item><title>ElixirConf 2018 crunch time</title><link>https://frank.kumro.dev/posts/2018-08-01-elixirconf-2018-crunch-time/</link><pubDate>Wed, 01 Aug 2018 22:43:00 +0000</pubDate><guid>https://frank.kumro.dev/posts/2018-08-01-elixirconf-2018-crunch-time/</guid><description>&lt;p&gt;Crunch time is here, ElixirConf is in 36 days! I started my presentation which is going to require a lot more time than previously imagined. My goal is to have the audience laugh a bit while learning how to build their own weather station. Once again I will go with TenderLove’s approach, laugh at your own jokes and others will join you.&lt;/p&gt;
&lt;p&gt;It’s challenging to try to forget what you know in order to better teach others. I don’t want to make any assumptions about the audiences knowledge, or forget to mention some important details. There was a bit about the Elm front-end that may get cut due to time. I have a branch for &lt;a href="https://gitlab.com/fkumro/lake_effect"&gt;Lake Effect&lt;/a&gt; with some basic, but broken channel support, not enough to talk about at the moment.&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><item><title>Learning Elixir – August 2017 Update</title><link>https://frank.kumro.dev/posts/2017-08-14-learning-elixir-august-2017-update/</link><pubDate>Mon, 14 Aug 2017 22:49:00 +0000</pubDate><guid>https://frank.kumro.dev/posts/2017-08-14-learning-elixir-august-2017-update/</guid><description>&lt;p&gt;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.&lt;/p&gt;
&lt;h2 id="attempt-1"&gt;Attempt #1&lt;/h2&gt;
&lt;p&gt;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 &lt;em&gt;Programming Phoenix&lt;/em&gt; 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 &lt;em&gt;Programming Elixir&lt;/em&gt; but I couldn’t find the time to commit.&lt;/p&gt;</description></item></channel></rss>