Ball Dispensing Wheel Needs Simple Escapement:
It's a bit ackward, doing mechanical designs, but a good CLOCKMAKER could address the problems, creating a design for start-stop intermittent rotation, with ball dispensing every 45 degrees of rotation.
In the attached diagram, there is an existing ball, falling, that is soon to impact a trigger lever (see letter A.). Then, as seen, that blue 'fork' pivots, causing the right side pin to be withdrawn. Now, then, the big wheel (shown in green) can rotate some.
The big wheel is under some torque stress, having several steel balls, in dimples, around the periferey on the right half of wheel (actually a cylinder in full view).
As can be seen, the (blue) fork will insert on its left (see letter B.)
The purpose is to bring rotation to a halt, that being after 45 rotation, to be blocked by the left side of pivoting fork.
Now much of this is ackward, I cannot even come up with proper terminology, for moving machine parts. But logically, the diagram serves to show the purpose, as a start-stop dispensing action.
Even worse, (remember this is a 'software' project (!??), so I must admit: The design can't work this way, as there needs to be reciprocal actions, like in a pendulum clock. But readers can see the principal's, being low friction release, and re-capture of the dispenser wheel.
Besides the fundamental flaw, (needing actuation for both movements of fork, not just the one direction shown), other aspects needing design attention involve the small ARC of travel as each pin is moved, out of captive slot of the wheel. (Needs to be a straight path to avoid excessive friction).
Plus, there can be small rollers employed for further avoiding friction.
I consider some of these functions to be 'implementation details', but necessary.