Jason Allemann decided to create an amazing surprise for kids for their trick-or-treat by programming a LEGO vending machine for chocolates. He also coded in a 2-second delay to prevent button mashing from causing problems since only the first press will trigger the dispenser motor. This is also to make sure that no one can get too many candy bars!
Listen beautiful relax classics on our Youtube channel.
Here’s a video on how the vending machine works.
Image Credit: Jason Allemann