Lego GBC Batch Counter is a Lego Great Ball Contraption Module built for the Great Ball Pit – Challenge 2020, and is a module designed to output a batch of exactly 13 balls (or a range from 2-30) in a single batch.
You can read more about the challange here https://www.greatballpit.com/2020/09/great-ball-pit-challenge-2020.html
Program
The program was written in Lego’s block language and has 3 main parts
- Button event capture, for capturing the inputs from buttons and changing the target count and motor speed variables
- Distance counter loop, for counting the number of balls passed.
- Motor control loop, for running the conveyor or tipping ramp.
I also setup a control panel with buttons and guages to see what was going on.
Videos
Video of this module in operation