This is the code used for the automatic candy dispenser shown in these YoutTube videos: https://youtu.be/KxcxH3_G3Es https://youtu.be/nSmAkXWpc4M
For a parts list, please see our website here: https://barkersrandomprojects.com/projects/candyDispenser
On the first arduino board, load either 'main-sensors' or 'main-sensors-touchless'
On the second arduino board, load 'secondary-stepper' and wire them together as described below