When I started this blog two years ago, my first article described a hot potato game I wrote using the original Circuit Playground (before there was a Circuit Playground Express version). Now two years later I have created another game, the “Magic Hallowing”. Inspired by the children’s toy “Magic 8-Ball”, this Arduino sketch turns an Adafruit Hallowing into a fortune teller. Ask it a yes or no question, like “Will the Orioles have a winning season this year?”, shake the Hallowing, and the answer will appear on the screen, like “Don’t count on it”. Disclaimer: this is for recreational purposes only and should not be used to answer real life questions (but you already knew that).
So who can answer the question, “will I get more Twitter followers in the new year?” Why, the Magic Hallowing, of course! Magic by @adafruit and @MicrochipMakes M0 pic.twitter.com/8oDwR6Q3mt
— Dan The Geek (@cogliano) January 1, 2019
About The Magic Hallowing
The Magic Hallowing utilizes Adafruit’s Hallowing M0 Express. It contains the ATSAMD21G18 microcontroller by Microchip and has a ton of features. The Magic Hallowing sketch utilizes the Hallowing’s TFT display for displaying the answers and an accelerometer to monitor the shaking of the device. The list of answers generated by the Magic Hallowing are the same ones used the original Magic 8-Ball toy as described on Wikipedia. A word wrap routine was created to nicely wrap and center the answer responses. Also, the display fades in and out when displaying answers and the main title to make it look more mysterious.
Hardware Needed
You will need an Adafruit Hallowing M0 Express for this project. You will also need a rechargeable Lipo battery to make it portable. The 350, 400 and 500 mAh sizes are small enough and work nicely with the Hallowing.
Arduino IDE Setup
There is an excellent article about setting up the Arduino IDE for Hallowing on Adafruit’s website. Specifically, you will need to install the following Arduino libraries for this sketch as discussed under the “Using the TFT” and the “Full Test Sketch” sections in the article:
- Adafruit ST7735
- Adafruit GFX
- Adafruit LIS3DH
- Adafruit Unified Sensor
Once the Arduino IDE and libraries are installed, you will need to install The Magic Hallowing sketch, which can be found on my Github page at https://github.com/ZContent/Adafruit_Magic_Hallowing