The Arduino Starter Kit comes with many examples for beginners. The associated code is included on the Arduino IDE. To open the code on the Arduino IDE, go to:
File→ Examples→ 10.StarterKit_BasicKit → …
and choose the example you want to work on.
For this example we’ve modified the code for the Crystal Ball:
The Crystal Ball example is based on the famous mechanical toy called the Magic 8 Ball. After asking a question, you shake the ball and it will displays an answer. It looks like this:
The electronic version uses an Arduino, a tilt sensor to detect the shaking and a LCD to display the answers. We’ve changed the number of answers to be displayed and wrote them in German – because we live in Germany 😉 . We also use the switch…case instruction to create a function that displays the message in the LCD:
Here is a video showing some of the answers, randomly:
Here is a video, showing an example on how to use it:
Instead of using a breadboard, this time, we soldered the LCD on a circuit board with some connectors to attach the Arduino UNO underneath as a shield: