Todays summary: Watched @lawik's LiveStream: Video: Nerves, Livebook & small displays (eInk, OLED)
underjord.io/livestream-ner…

How @NervesProject helps you get started with Elixir and IoT without needing to know a lot about the hardware.

🧵0/13

#myelixirstatus #elixirnewbie
Raspberry pi is a great way to get your start in IoT, and Nerves and Livebook take that even further. Cool enough: the first real Elixir code Lars wrote was for the Rasberry Pi Zero.

1/13
You can sandwich a Rasberry Pi and an eInk display together. The Rasberry Pi runs your application and your application can use The Libraries Inky and Chisel to write to the display.

2/13
To do it yourself, you can clone nerves_livebook and follow the getting started guide with additional steps in the "going further" section to handle nerves_livebook not working (yet) with mix install. You need to add Inky and Chisel dependencies and a font for Chisel.

3/13
The Inky library allows you to write to the display using the Inky.start_link function with an InkySample and then set up a painter function to redraw the entirety of the school.

4/13
The Chisel Library made by @lgr0ldan allows you to convert a bitmap into pixels which you can then drop onto an OLED display. Chisel takes in a put_pixel function which draws one pixel at a time, deferring the full render push until every pixel is ready.

5/13
the mix firmware with a MIX_TARGET=<yourdevice> command in Nerves Livebook pushes a firmware update to your app by making a second partition to boot from and keeps the old partition in case of a serious issue.

6/13
The Raspberry Pi Zero is great for having fun with IoT. For more serious projects Lars likes the Pi 3 and Pi 4.

7/13
Lars also shows how to connect a game controller peripheral with an analog stick and a couple buttons to the Rasberry Pi.

8/13
You can read the button states using the Circuits GPIO library. GPIO (General Purpose Input Output) is a common way of working with simple electronic devices.

9/13
You configure the GPIO pin numbers for your hardware, and then you can read the state using the Circuits.GPIO.read(ref) function.

10/13
You can use set interrupts to respond to changes in the game controller's state. First, you create a Genserver, which listens to any incoming set interrupt messages.

11/13
Then upon receiving a new set interrupt message with the current controller state, you respond however you'd like - for example, you could draw to the screen. Taking that further, you could make a game!

12/13
Really enjoyed this stream by Lars. I wasn't able to catch it live but hope to catch the next one.

For the full video go here: underjord.io/livestream-ner…

13/13

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Brooklin Myers

Brooklin Myers Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @BrooklinJMyers

15 Sep
Listened to @ThinkingElixir with @cadebward @bernheisel and @brainlid and guest @voltonez

OTP Certificates Woes with Bram Verburg. spoti.fi/3luRtVs

On September 30, 2021, the root CA certificate DST Root CA X3 will expire. Here's how you stay safe. 🧵

#myelixirstatus
Bottom line, before the end of September, if you are on Elixir OTP 23 or 24 you should upgrade to the latest patch.

specifically OTP 23.3.4.5 or OTP 24.0.4
If you are on an OTP version older than 23, the good news is you will be unaffected so long as you do not upgrade your dependencies. You can freeze your dependencies in order to buy yourself time to upgrade to OTP 23 or 24.
Read 5 tweets
14 Sep
Today's summary thread! @ElixirOutlaws with @Adkron, and @ChrisKeathley. Episode 101: Bright and Tight.

open.spotify.com/episode/6YW6Qb…

This episode was packed with information on handling errors in Elixir.

#elixirstatus #elixirnewbie

🧵0/10
Error handling can be tricky, and can cause a task you would expect to take a single day to instead take a whole week!

1/10
This episode is focused on dealing with errors caused by working with external services. Anytime you're dealing with external dependency, you expose yourself to risk.

2/10
Read 11 tweets
13 Sep
Listened to @BeamRadio1 Episode 18: Code Heresy with Chris Keathley.

Today's panel: @lawik @akoutmos @_StevenNunez @redrapids, @sm_debenedetto, and special guest @ChrisKeathley.

Summarizing some interesting and controversial opinions today 🧵 0/24

#myelixirstatus #elixirnewbie
By far the most loved library on the Panel today was Telemetry. Telemetry powers monitoring and observability in elixir projects and provides a consistent interface to do so. Other mentions were OTP, Livebook, and site_encrypt.

1/24
When members of today's panel came into the Elixir Industry, they found opinions they like and trust from the Elixir community but also questioned established norms. Thus today's topic: Code Heresy.

2/24
Read 25 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(