Introduction: How to Make Your Own Slot Machine!

Hey Guys,

My name is Sergi van Ravenswaay and today I will show you how to make a slot machine. I made this in combination with the Game Engine 'Unity' and 'Arduino'. It's really simple!

What you need:

  • An Arduino Uno
  • 1 Power Cord (USB)
  • 10 cables
  • 4 resistors
  • 4 buttons (You can get better ones than the standard ones)
  • One Breadbord
  • A nice monitor or use your own laptop
  • Some wood for customization

Step 1: Connect the Wires of Your Buttons!

The first step is to connect the wires. It's the easiest part of this tutorial. Connect the wires on the places above!

  • This means connect 4 buttons to the plus from 13, 12, 11, 10. C
  • Connect the cable from the ground to the - row.
  • Then connect all the wires to the - and the resistors to the plus.
  • At last. Connect the plus cable from the 5V to the Plus
  • (This is very important or your button will even break!)

Step 2: Add Your Code to Your Arduino

Add code to your arduino Uno! Make sure you installed the 'Arduino 1.8.1' program!

https://www.arduino.cc/download_handler.php

It looks like the most scary tab but it really isn't. Make sure you connected it to the right port.

The code will speak for it's self as it is in the attachment! It's a simple buttonpress.

Make sure it's on HIGH if you have a pull in and pull back button. LOW if you don't!

Step 3: Connecting It With Unity

To connect it with Unity you need to do the following steps. Make sure you download Unity (I made this in Unity)

https://unity3d.com/get-unity/download?thank-you=u...

Then make sure you have the following setting (on the first picture) enabled. Set it on .NET 2.0. Now add the following script in the attachment.

Make sure to attach the following objects to the right scripts. Every comment is commended so you will read what it does! If it works. You can add your own round model to your unity and have a gambling machine like this!

Step 4: Customization

To customize your case:

  • I used multiplex wood (1.4mm) just to be sure it will carry a heavy screen.
  • I saw the front and the back part (20cm x 50cm) and the down part by (20cm x 30cm). You need to calculate the angle of your screen to know what the top part his size is.
  • I saw the middle of my screen out (21cm by 15cm)
  • Made some holes for the buttons (2.8mm)!
  • Be sure to add the buttons before glue it together or jamming the case together. It is very hard to add them.
  • Eventually add the buttons and be sure to glue the panels tight!

This customization really depends on what you want! I just gave mine for some inspiration!

Comments

author
tomatoskins (author)2017-01-23

What a fun project! Thanks for sharing and welcome to the community!