{,not} easy things

<-- home

Open-source necromancy part II - recreating library for GAINER board

Some background

In my last post I recreated, programmed and tested GAINER board - a really interesting piece of embedded electronics using unique microcontroller. Unfortunately the software part did not age well and was hard to use because of lack of very old (alpha) version of [Processing] binary. Other software libraries for Flash and Max/MSP could not be used in GNU/Linux environment.

gainer-lua-lib

So I decided to write my own library in one of my favorite languages - Lua. There was a problem because Lua serial libraries that were available had some problems and have to be compiled as a Lua library. I decided to use something simpler - LuaJIT FFI and termios.h for serial port communication. Currently it only works on GNU/Linux (probably also on *BSD - I haven’t tested it yet) but it shouldn’t be hard to port it to other systems like Mac or Windows. Usage of this library is quite simple and all the documentation and examples is available on lua-gainer-lib repository.

GAINER LED matrix shield

GAINER LED matrix shield When i was looking in the code and on the internet I found that GAINER have mode to control 8x8 LED dot matrix display. after some testing on breadboard and designing in KiCad I made a simple board to connect GAINER to this 8x8 LED matrix. Every dot on this matrix can have 16 levels of brightness so it can be used in more interesting ways than microcontroller with MAX7219. There is little error in the design (spacing between pin headers of GAINER board is too small but female pin headers can be bent to fit so there is no problem) but overall it works very well and the PCB can be made in home - design uses only one layer and big 1206 SMD resistors. KiCad design files and more photos are available in this repository

Was it worth it?

Definitely. It was a really fun experience - especially with LuaJIT FFI which is awesome! Also KiCad can be somewhat unintuitive and using tutorial for it was very helpful.