Elixir, Nerves, Phoenix on A Raspberry Pi
Elixir and Nerves is fun!
A Phoenix-Channel listen on messages from web-clients and switch LEDs on and off.
In the other direction, pressing the button triggers a
Phoenix-channel broadcast to the server, the server randomizes the
three leds and sets them through Nerves.GPIO
.
Because setting the LED status broadcasts to all web clients,
each display of the buttons on screen is in sync with the LEDs
on Raspberry’s breadboard.
Find the source on Github. Also, you can download the video
A Pretty Strong Team
Elixir, Phoenix-Channels, and Nerves
The best thing about Nerves is the way you can update your raspberry over WiFi without fiddling around with SDCards. All you have to do is
... code ...
mix firmware
mix firmware.push nerves.local
... test ...
Update 2018-08-27
I added a thermometer-circuit and a display for the current temperature using the PCF8591 A/D-converter.
Circuit For Button and LEDs
Extended With Circuit For Thermo-resistor And PCF8591
The code for the thermo-extension is at Github-commit
A big credit for Arkham’s Example