ca1989

ca1989

Projects to start with Nerves

Hi all,

I would like to start playing with nerves at home (in the free time).

Where can I find ideas for small beginner friendly projects to realize in a tiny apartament?

Better if they don’t involve extremely expensive devices

Cheers!

Most Liked

lucaong

lucaong

I think I wrote the same idea in other posts too, but one relatively simple and useful project is to implement an indoor air quality monitoring device. You can use a RPi and a sensor like the BME680, which measures temperature, atmospheric pressure, relative humidity and gas resistance (which is a proxy for concentration of volatile organic compounds, a common class of air pollutant).

You can either connect a display, or even simply run a Phoenix app on the device, so that you can check the air quality from your smartphone. For example and inspiration, this is how the UI of my old BME680 based project looks like:

In my project, I run a Phoenix app on Nerves, using the elixir_bme680 library to interface with the sensor (I had to write the library myself back then, but nowadays there is also the great BMP680 library). The UI is implemented with LiveView, rendering SVG (but standard HTML would work perfectly well if one does not need anything fancy). I also log the measurements on CubDB and provide a way to download the historical data.

If you need more guidance, another option is to purchase the book Build a Weather Station with Elixir, which also guides you through a similar project.

lucaong

lucaong

Another really fun project is to implement a low-cost thermal camera using the Melexis MLX90640 sensor. Long time ago I wrote elixir_mlx90640 to interface with it from Elixir/Nerves.

Here is an example project using it, using an old Nerves version, but as of a few months ago still functional.

lucaong

lucaong

I used a Raspberry Pi Zero W for both the two projects I mentioned above, and it works absolutely fine (just a bit slow for the thermal camera, but the library could be optimized to send frame pixels in a more efficient format than a JSON array). The RPi Zero is smaller and generally less powerful than both the 3 and 4, so definitely the RPi 3 is a good option too.

The thermal camera sensor is unfortunately a bit pricey (but professional thermal cameras are way more expensive, usually in the thousands of euro). The BME680 can be found from several sources, and has good prices.

Where Next?

Popular in Discussions Top

PragTob
Hey everyone, this has been on my mind for some time and I’d love your input on it! TLDR: I feel like maps are superioer for storing and...
New
AstonJ
If a newbie asked you about Phoenix Contexts, how would you explain the basics to them? Feel free to be as concise or in-depth as you li...
New
AstonJ
I’ve just started the Phoenix part of the utterly brilliant online course by @pragdave. On generating the Phoenix app he uses the --no-ec...
New
chuck
Let me start by stating an assumption: Phoenix is a great approach to building REST APIs. There are many reasons for this, but I will ass...
New
AstonJ
Seen any cool LiveView demos, sample apps or examples? Please post them here! :003:
New
Fl4m3Ph03n1x
Background A few days ago I was listening to The future of Elixir from Elixir Talks, with Dave Thomas (@pragdave ) and Brian Mitchell. I...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New

Other popular topics Top

Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
Darmani72
If I have a post route which an argument: post /my_post_route/:my_param1, MyController.my_post_handler How would get the post params ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
sergio
Kind of like when jquery came out, it was super necessary. Existing drag and drop libraries have a bunch of baggage to support old browse...
New

We're in Beta

About us Mission Statement