By using the micro contollers such as arduino the experiment can be proceed.
Step-by-step explanation:
If the mechanism is allowed to integrate the electronic parts then the process is easy. By using the micro contollers such as arduino the experiment can be proceed as follows. By placing a pressure sensor at the bottom of the bottle, the balls can be identified to the controller. Put the condition that tip the bottle as long as the sensor triggers and all balls get spilled and the bottle come to its original position. The bolt pivot must integrate servo motors and motor drivers also.