How long do you have? A magic book to tell you exactly that!
Combining the magic of watching all the Harry Potter movies in a week and the networking term TTL (Time To Live), we’re going to build our own black magic book, showing how long you have to live.
It starts with finding an old book to use. Make sure it’s nice and thick so you have plenty of space for the electronics. A great place to look are thrift stores, they have loads of cheap old books. In this case I’ve found a medical book from the 80’s. Perfect, as it has a lot of cool images to use for styling.
Now we have our book, we’re going to glue most pages together to create a nice “block”. I’ve used some bookbinder’s glue because it dries nice and see through. I think you can also use different types, but I haven’t tested it. Put some glue between the pages and press them firmly.
Gluing pages together
To speed things up you can also glue the sides together, a combo of this and full page gluing creates a solid block.
Pages sides glued
After drying, it’s time to cut out our electronics compartment, a Dremel with the woodcutting wheel works perfectly. Make sure to wear some protection, it creates a lot of dust.
Cutting out a compartment
That’s one nice compartment, just add some extra duct tape for strength. Full instructions for creating a secret book compartment, can be found here.
Good old ducttape to cover up some mistakes
Next step is adding a “lid” to our compartment. Gluing some pages together gives us a basic lid. Adding a magnet means we can open and close our compartment.
Cut out a little indent and glue both the magnet (next to our compartment) and metal plate (bottom of lid) in place.
Magnet and metal plate
The magnet glued in place
With our compartment and lid in place, our book is almost done. To give the visible page the right (creepy) look and feel you can do the following:
- Cutting and gluing images on the page (skulls and plants in this case)
- Burning the images/pages and submerging them in water
- Carving a sentence into the page and going over it with charcoal
- Anything else that comes to mind, you can go nuts…
Now we can move on to the electronics. We will need the following parts:
- Raspberry Pi (Arduino,…)
- A push button (any)
- Small LCD screen
- Powerbank or Powerplug
With everything wired up, measure the button/screen and cut holes into the lid for a snug fit.
The only thing left is the magic part. You can find the full code in the attachments.
For good measure, a quick overview of the logic:
- Listen if button is pushed
- If so, generate a time(amount of seconds) and display it
- Button is not pushed, check if the time is 0 If there’s time left, lower it by one, and display what’s leftNo time remaining, say Bye Bye
You can tweak the amount of time you give to the unfortunates in the following line of code:
number = random.randint(1,60)
You can also change the messages displayed in these lines:
lcdShowMessage("Time to live", lcdLine1) lcdShowMessage("Bye Bye" , lcdLine2) lcdShowMessage(str(number) , lcdLine2)
And that’s all!
Now we have a magic spell book, perfect for a very early Halloween!
Final look and feel