Skip to main content

Arduino Starter Kit - Video 7. Crystal Ball

 

In this video tutorial we will learn how to build a Magic 8 Ball out of an Arduino with Massimo Banzi. 

Historically, a Magic 8 Ball is a plastic sphere resembling a black and white billiard 8-ball. The ball contains a floating 20-sided die that can be seen through a transparent window and which shows affirmative, negative or noncommittal statements. The user is supposed to ask yes-no questions, which the ball will magically answer. 

Massimo's version of the ball consists of a Arduino, a tilt sensor and a LCD display, which is also included in the new Arduino Starter Kit [link].
When the Arduino is shaken, the LCD display shows the answer to the question of the petitioner.

The circuit is composed of a LCD screen and a tilt sensor and a control mechanism in the code more sophisticated than in previous tutorials [link], introducing the use of third-party software libraries. A potentiometer is also used to control the contrast of the LCD display.

When the Arduino is shaken, the tilt sensor sends a signal to the Arduino board. Once the signal is detected, the code picks one of 8 random sentences and sends it to the LCD display. The LCD display would require quite a lot of code to be controlled, but luckily we can use the "liquidCrystal" library, which can be added easily via the Arduino development environment.

This tutorial opens up new possibilities for interacting with Arduino as using the LCD display allows arbitrarily complex feedback from the Arduino. 

You can find the previous tutorials here and subscribe to the upcoming Arduino video tutorials. As Massimo always says: build it, hack it and share it on the internet, because Arduino is you.

 

DesignSpark Electrical Logolinkedin