All Projects → pappersverk → inky

pappersverk / inky

Licence: Apache-2.0 license
A library for managing Inky e-ink displays from Elixir.

Programming Languages

elixir
2628 projects

Projects that are alternatives of or similar to inky

kiwi
Kiwi turns your Pimoroni Keybow into a fully customizable poor-man's Elgato Stream Deck!
Stars: ✭ 40 (-33.33%)
Mutual labels:  nerves, pimoroni
scenic asteroids
A toy Asteroids clone written in Elixir with the Scenic UI library
Stars: ✭ 42 (-30%)
Mutual labels:  nerves
lemon
Lemon – LED Monitor – is a $79.43 opensource alternative to LaMetric that supports GitHub-, IFTTT- and Zapier-webhooks and even integrates with Pushover!
Stars: ✭ 45 (-25%)
Mutual labels:  pimoroni
elixir bme680
An Elixir library to interface with the BME680 (and BME280) environmental sensor
Stars: ✭ 19 (-68.33%)
Mutual labels:  nerves
octopus-agile-pi-prices
Display the upcoming prices on the Octopus Energy "Agile" tariff.
Stars: ✭ 35 (-41.67%)
Mutual labels:  pimoroni
hap
A HomeKit Accessory Protocol (HAP) Implementation for Elixir
Stars: ✭ 50 (-16.67%)
Mutual labels:  nerves
enviroplus exporter
Prometheus exporter for enviroplus module by Pimoroni
Stars: ✭ 70 (+16.67%)
Mutual labels:  pimoroni
pigpiox
An Elixir wrapper around pigpiod for the Raspberry PI
Stars: ✭ 29 (-51.67%)
Mutual labels:  nerves
nerves init gadget
Simple initialization for devices running Nerves
Stars: ✭ 53 (-11.67%)
Mutual labels:  nerves
elixir-opencv
OpenCv NIF Bindings for Erlang/Elixir.
Stars: ✭ 30 (-50%)
Mutual labels:  nerves
nerves thermal camera
Thermal camera imaging with Elixir, Nerves, Raspberry Pi, and a MLX90640 sensor
Stars: ✭ 28 (-53.33%)
Mutual labels:  nerves
rpi-enviro-mqtt
Send air quality data from a Pimoroni RPi Enviro+ over MQTT
Stars: ✭ 30 (-50%)
Mutual labels:  pimoroni
grovepi
Use the GrovePi in Elixir
Stars: ✭ 46 (-23.33%)
Mutual labels:  nerves
Juni
12 Keys Chorded keyboard layout
Stars: ✭ 51 (-15%)
Mutual labels:  pimoroni
nerves livebook
Develop on embedded devices with Livebook and Nerves
Stars: ✭ 135 (+125%)
Mutual labels:  nerves
unicorn-fft
Audio visualization on the Unicorn Hat using FFTW
Stars: ✭ 36 (-40%)
Mutual labels:  pimoroni
nerves system ev3
Base Nerves system configuration for the Lego EV3
Stars: ✭ 23 (-61.67%)
Mutual labels:  nerves
Nerves
Craft and deploy bulletproof embedded software in Elixir
Stars: ✭ 1,778 (+2863.33%)
Mutual labels:  nerves
mdns lite
A simple, no frills mDNS implementation in Elixir
Stars: ✭ 29 (-51.67%)
Mutual labels:  nerves
shoehorn
Handle OTP application failures without restarting the Erlang VM
Stars: ✭ 36 (-40%)
Mutual labels:  nerves

Inky

CircleCI hex.pm

This is a port of Pimoroni's python Inky library written in Elixir. This library is intended to support both Inky pHAT and wHAT, but since we only have pHATs, the wHAT support may not be fully functional.

See the API reference for details on how to use the functionality provided.

Host Development

An inky host development library is underway for allowing host-side development, but until that is finished you can not see results without using a physical device.

Scenic Driver

A basic driver for scenic is in the works, check it out, to follow how it is progressing.

Getting started

Inky is available on Hex. Add inky to your mix.exs deps:

{:inky, "~> 1.0.1"},

Run mix deps.get to get the new dep.

Usage

A sample for Inky only, both host development and on-device is available as pappersverk/sample_inky.

A sample for using it with Scenic both for host development and on-device is available as pappersverk/sample_scenic_inky.

Brief example

In typical usage this would be inside a nerves project. If Inky is installed in your application you can do the following to test it and your display (note the config in init, adjust accordingly):

# Start your Inky process ...
{:ok, pid} = Inky.start_link(:phat, :red, %{name: InkySample})

painter = fn x, y, w, h, _pixels_so_far ->
  wh = w / 2
  hh = h / 2

  case {x >= wh, y >= hh} do
    {true, true} -> :red
    {false, true} -> if(rem(x, 2) == 0, do: :black, else: :white)
    {true, false} -> :black
    {false, false} -> :white
  end
end

Inky.set_pixels(InkySample, painter, border: :white)

# Flip a few pixels
Inky.set_pixels(pid, %{{0,0}: :black, {3,49}: :red, {23, 4}: white})
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].