Here we have a button switch to enable the rotation of the reels (represented by LED matrices). If players have the three consecutive images on the reels, the motor will rotate and candies will be dropped off from the candy dispenser. However, our goal was to have a lever instead of the button to offer players a classic slot machine experience. We put a flexible supporting material, small styrofoam, on the top of the switch; therefore, whenever the lever is pulled, the styrofoam is pushed enabling the click of the button switch.
Candies dropping off from the dispenser
Initially, the percentage to have the three consecutive images out of five images is about 4% (5/(5 x 5 x 5) * 0.01) but we altered the code to allow the players a more chance of winning. Now, the second and third reel feed information on the image of the previous reel and decide their images based on the previous one. This modification increases the percentage to have the three consecutive images to about 20%.
A combination of three sevens is equal to jackpot where the motor will rotate five times offering the more candies to the player.
The entire code can be found at https://github.com/cuinjune/SlotMachine .
We first used a laser cutter to cut out the template of the body of the slot machine. Unfortunately, later we found out that everything cannot fit inside because of the limited space. We decided to double the size of the width and to use the 3D printer to print the model for a cleaner execution.
Prototype model (left) and template (bottom)
Pumpkinhead to add Halloween spirit.