A Raspberry Pi is a tiny, low-cost computer that was created to teach young people about computer science and programming. They’ve been embraced by the maker community and are being used for everything from robots to spinning wheels to cellphones to Minecraft servers.
A few months ago I saw a post on Tumblr that showed an “Electr-O-Matic Book Fortune Teller” that used an Arduino (a computer similar to a Raspberry Pi) to print book recommendations onto receipt paper when people pushed a button. This seemed like a relatively easy project for myself and some other students to use to get experience working with a Raspberry Pi.
The first step was setting up the Raspberry Pi itself. Raspberry Pis run a version of Linux that’s a lot less scary than you might think. We messed up our installation, but you don’t have to do that!
Next we had to set up the mini thermal printer (we bought ours from Adafruit). This involved cutting and stripping some wires, then screwing them into a DC power adapter so we could plug the printer into a power source. Then we installed the printer driver onto the Raspberry Pi.
Once we did that we connected the printer to the Raspberry Pi’s GPIO pins using the included wires and printed off a test page.
Actually, first we wondered why nothing was working once we’d hooked everything up. Turns out you need to plug the HDMI cable into the Raspberry Pi in order to have anything show up on the computer screen. Despite being supposedly intelligent, tech-savvy graduate students, we forgot to do this at least
four five times (so far) during this project.
Once we had the printer working we started work on hooking up the button. This is a complicated process that involves:
1. Acquiring a button that doesn’t actually have the necessary connectors.
2. Purchasing the wrong resistors.
Of course you can choose not to follow our steps directly and just get the proper pieces the first time. Either way, you then wire everything into a breadboard and connect it to your Raspberry Pi. (Your breadboard doesn’t have to be quite so long, but we ended up using ten resistors instead of one because we originally had the wrong type.)
You’ll then have to install or create a program on the Raspberry Pi that understands when your button has been pushed and tells the printer to print a review. We’ll hopefully have one available on our blog soon! The reviews for our machine are ones that we wrote and include title, author, and a brief description. You could choose to include other information such as ISBNs or call numbers.
Once all of that is done you’ll have a working machine that will print off book recommendations! You’ll probably want to get some sort of box to put everything in, but we’re still working on that.
We haven’t completely finished this project yet, but we’ll be posting updates (and eventually complete instructions) to the ASIS&T at UBC blog! In the future we might expand the machine so that it will have more than one button to allow readers to pick from different genres, moods, or other qualities (books with covers the colour of the buttons?)
We’ll be showing off our machine at the Vancouver Mini Maker Faire on June 7th-8th at the PNE, you should come by and check it out!
Throughout the month of May students from UBC’s School of Library, Archival and Information Studies will be posting their best Readers’ Advisory tips to the RAIG blog!