Arduino implementation of an 8ball toy, using an sh1106 display and a MPU6050 accelerometer module
Just ask your question and give it a little shake!
(Update february 2021): After a redisign of the internals (and updates of the dependencies that make them more stable) this project is in a v1 state, after some months/years of lack of maintenance:
This can be mounted on any small box (provided that you cannot print a ball shaped container) and it is currently based on an Arduino Nano:
It is also wired to a power switch and a 9v battery to make the device portable (and give it some additional mass for better feeling upon shaking)