Snakes on a Bookshelf : MicroPython for Bibliophiles¶
This article is a work-in-progress.
In this article, I’ll showcase the bookshelf LEDs that I’ve set up for the search engine. I’ll not go into too much detail here, since that will be part of a series of posts on the Shelfie project.
My photography skills leave much to be desired. I’ll have to retake some of these photographs so that I can present this project better.
I am a voracious reader. Unlike most people, I read paragraphs at a glance when I’m in the mood for it, not lines or words. That helps me read about 500-800 pages in two or three hours.
I’ve been buying a lot of books, and I read widely and across a varied set of genres.
I think I have 900 books. I am not quite sure. It is hard to count, sometimes.
It becomes hard to find books sometimes. Case in point: I own two copies of several books.
To solve this problem, I decided to blend my love for Python, and my love for books into one.
I discovered the ESP8266 nodemcu chip a while ago, and it proved to be really easy to set up. So, using that idea, I decided to look up what I could build with a couple of them.
This article won’t go into the intricacies of the project, because I plan on describing it further in a series of articles. However, here I plan on describing my thought process while I was prototyping this project.
Call Me Trippy¶
The first step, was sticking a series of WS2812B addressable LED strips along the sides of the bookshelf. This was a little easier where the top of the bookshelves were concerned. I was lucky that the total length was just under 5m.
I used cellophane tape to secure the strips. I probably should have used double-sided cellophane tape, but so far, the ordinary tape has secured it in place.
Once the LED strips were in place, the first plan of action was to get it working.
I used the NODEMCU to drive the LED strip. Turns out, I needed a load-shifter to convert the 3.3V signal from the NODEMCU to 5V required by the LED strip.
I Like ‘em Blues¶
I had to cut and resolder the LED strips for the insides of the bookshelf, a feat easier said than done, because I’d never touched a solder-iron before.
What’s Capacitance, Doc?¶
I never really paid attention during Electronics class. So I seemed to have goofed up where the circuit was concerned.
I seemed to have gotten something wrong with the circuit, and it turns out that I needed a 100µF capacitor between the inputs to the LED strip.
Let Me Worm My Way Out Of This¶
Once half-way there, I could slowly control the timing with a little precision. That allowed some interesting hijinks.
How Long Does This Take?¶
But I kept having the same problems, over and over again. Sometimes, the circuit worked, and at other times, it did not.
But once I managed to figure out the circuit’s power requirements, I had exactly what I wanted.
I need to organize this project better. This is where the Vial project stemmed from, and fulfilling that project will help the realization of the Shelfie project.
Shelfie, The Bookshelf Search Engine¶
Shelfie is powered by Raspberry Pis, CouchDB, MicroPython, NodeMCUs, Flask, Vial, RabbitMQ and the WS2812B LEDs.