GregMefford / blinkchain

Nerves project to use Elixir to drive NeoPixels from a Raspberry Pi
MIT License
71 stars 27 forks source link

Convert to an OTP Application? #11

Closed fhunleth closed 5 years ago

fhunleth commented 6 years ago

How do you feel about converting the library to an OTP Application? It seems like it's not runtime configurable (Neopixel hotplug isn't a thing) and it's too dependent on low level hw to ever support multiple instances.

I think this would simplify things since Nerves.Neopixel would no longer have to be added to your application's supervision tree. A side effect would be that configuration would need to be moved to the config.exs. This simplifies my setup and seems like it should be ok for most users.

GregMefford commented 6 years ago

Yes, I agree that this library makes more sense as a singleton OTP app since the configuration will pretty much always be set at compile time to match how your actual hardware is wired up.

GregMefford commented 5 years ago

This is resolved now with #15, along with a complete re-write of pretty much the whole thing, and a rename from nerves_neopixel to blinkchain.

You can now also specify a 2-dimensional drawing surface with the pixels arranged however you want, and use drawing commands to draw the frame instead of transforming into an LED color list manually. I'd love to get your feedback if you have a chance to play with it at some point.