/magic8ball

Arduino (ESP32-based) project for digital implementation of "Magic 8 ball" toy

Primary LanguageC++

"Magic 8 Ball" toy project

Arduino (ESP32-based) project for digital implementation of "Magic 8 ball" toy

Features

This digital toy project offers many nice features unlike similar ones:

  • multiple languages support
  • synthetic voices
  • realistic (or "realistic" 😉 ) animations
  • gesture-based user interface
  • "deep sleep" functionality (for better power consumption)

Parts

Name Link
ESP32 development board eBay
TFT IPS Display 1.3'' 240x240 Amazon
DFPlayer Mini eBay
16GB micro sdcard Amazon
MPU-6050 Accelerometer & Gyroscope Sensor Amazon
AAA battery holder AliExpress
Short micro USB cable eBay
Push button Amazon
Original "Magic 8 ball" toy (for case) Amazon

Note: I believe, you can find better parts pricing on Ali/eBay etc. And I already had many of these parts before starting this project.

Circuit

Circuit

Zoomed ESP32 <-> Display connection (please note, different display type might require different connection scheme)

Display Also, here is YouTube video for connecting ST7789-based displays to ESP32

Note: you may want to add some resitors (for pulldown serial communication) or capacitors (for VCC). However in my case everything works "as is" 😉

Building Arduino sketch

You should add a few extra libraries to Arduino IDE to build this project (see project includes)

For voice files generation I provide a small console utility GenerateVoices. Build it using VisualStudio (or download from Release section), and run from command prompt:

GenerateVoices.exe [full_path_to_Arduino_sketch]

i.e.

GenerateVoices.exe C:\repos\magic8ball\magic8ball.ino

then copy generated mp3 files to the root of sdcard.