loading

Geetings everyone,

In this Instructable I'm going to show you how to make your very own blackjack computer! The computer van handle 1 human player and 1 PC which comes with the code I've provided with this Instructable.

To make this computer you'll need the following:

--MANDATORY - PART 1--

2 x Button
2 x Led (anything as long as it lights up in a single color).
19 x Male to male wire
1 x Female to male wire (or 1x female to female and 1 x male to male and plug those into eachtother, I myself used this.)
2 x 8x8 MAX 7219 RED LED MATRIX
1 x Arduino board
1 x Bread board (preferably a big one)

--OPTIONAL - PART 2-- (For making it in a box instead of making it on a breadboard)
Enough solder-tin to get everything together
Solder set
Empty circuit Plate to solder the individual piece together.
Small box that can contain the circuit (I used a 8cm*15cm*7cm(L*W*H) box.)

--REQUIRED LIBRARY--
This code uses the LedControl Library, which can be found here: LedControl library download.

To install the library you simply drag the downloaded folder into your library folder in the folder where you installed the Arduino software and unzip the .zip folder (if you haven't already).

The finished product can be seen above. As you can see, I'm not very good with my hands, so I'm confident you will be able to make it much better than I did!

In the first part of this Instructable I will show you how to make the circuit on a breadboard and for the second part, where I show how to make the box, I expect you to have soldered the circuit together on your own.

Let's get on with making it!

Step 1: (START PART 1) Step 1: Making the Circuit

In the image you can see the entire circuit and how it fits together.

To avoid confusion I will show you how to hook up the LED matrixes properly in the next few steps.

------WARNING-----

The Fritzing image included here says the left-most button goes into Pin(4) and the right-most button goes into Pin(3), while the left-most button should go into Pin(3) and the left-most button should go into Pin(2).

Step 2: Step 2: Hooking Up the LED Matrix

If you don't know what I'm doing in the steps described below, you can refer to the pictures.

1. Plug in the LED matrixes right next to each other and connect the VCC pins with wires and connect a wire to the (+)track on your breadboard.


2. Connect the GND pins and connect a wire to the (-)track.

3. Connect Pin(12) on your arduino to the DIN pin on the first LED matrix and from the DOUT pin on the first LED Matrix to the DIN pin on the second LED Matrix (see image for clarification)

4. Connect Pin(10) to the CS pins on your breadboard.

5. Connect Pin(11) to the CLK pins on your breadboard.

6. Connect Pin(5V) to the (+)track on your breadboard.

7. Connect Pin(GND) to the (-)track on your breadboard.

Step 3: Part 1 Done!

You have completed the circuitry for the black-jack computer!

You can download the .zip included in this step and upload the code to the arduino!

If everything was hooked in together properly according to the image the LED displays should show two 0's and change when the buttons are pressed. When you press the button in Pin(2) you add to the number and when you hit the button in Pin(3) one of the LED's should turn on and you'd see you'd passed your turn. The other light turns on then the computer hits any number higher than 17 because he's the dealer.

I hope this Instructable has taught you anything.

With kind regards,

Vincent

Proceed if you want to see how you can make a box to contain the soldered together parts of this circuit.

Step 4: (START PART 2) Step 1:

To follow this part of the Instructable you need the --OPTIONAL-- parts I mentioned in the beginning.

You need a knife, scissors and some duct-tape (or sticky tape) to secure some parts inside the box.

By this point you need to have soldered the curcuit together.

Step 5: Step 2:

Mark out and cut open the spots for the Matrixes, LED's, buttons and power chord. Also secure your arduino with a few pieces of ducttape on the bottom of it to prevent it moving around and to make you able to remove it laten on for further projects.

Step 6: ​Step 3:

Add in a platform to support your circuitry in case you don't want to ducttape your circuitry to the box.

Place in the Matrixes, LED's and buttons in their respective slots and secure them in place(either through the platform or ducttape(or both))

Step 7: Done!

All you need to do now is plug the wire into your laptop and you can play it!

I hope you've learnt something from all this!

With kind regards,

Vincent

<p>That's a great way to reuse materials :) You should enter the Trash to Treasure contest!</p>
<p>Thanks for the comment! And I have entered it on your suggestion, now let's hope I win :)</p>

About This Instructable

1,394views

12favorites

License:

More by Vincentmc99:Simple Arduino Black-jack Computer 
Add instructable to: