Knight Duel Game

Introduction: Knight Duel Game

This is a game machine. Two players can join the game. This game is a duel of the luck and challenge of the choice you make.
Here's the role of the game.
Role:

1. Two players take turns.

2. In each turn, the player can choose only one action:

-choose a weapon or -use a weapon

3. Choose a weapon:

Push the button, the machine will random choose a weapon for you. The LED beside the weapon will be light. Repeated acquisition of weapons does not count.

4. Use a weapon:

There are two weapons. Sword and Shield.

Move your character to the holes to use the weapon. You can only use the weapon that you already have.

---Use the shield. The LED of the protection will light.

---Use the sword. When your opponent doesn't have the protection, your opponent will get hurt. When your opponent has the protection, you will break the protection.

5. Victory

When your opponent got hurt twice, you win. There will have some sound of celebration.

Step 1: Step 1: Materials

Before we start to make our project, we need to prepare these materials.

The Materials needed for this project are:

  • (1x) Arduino Leonardo
  • (6x) Photoresistors
  • (16x) 100Ω resistors
  • Male-female jumper wires
  • Male-male jumper wires
  • (2x) Red LEDs
  • (2x) Yellow LEDs
  • (2x) White LEDs
  • (1x) Green LEDs
  • (1x) Blue LEDs
  • (1x) Buzzer
  • (2x) Pushbuttons
  • (4x) Terminals
  • (2x) connector housings
  • Dupont jumper wires
  • (1x) Pin headers
  • (1x) Needle nose pliers
  • Cardboards
  • (1x) Pencils
  • (1x) Box cutters
  • (1x) Glue gunBrushes
  • Acrylic color and palette
  • (3x) Rotary knobs (better replaced by the two "knight"s and one "pawn" of the chess)

Step 2: Step 2: Assemble the Buttons

We need to assemble the pushbuttons and Dupont jumper wires before we start making this circuit.

How to assemble the pushbuttons and jumper wires together?:

1. Take out the pushbuttons, terminals, Dupont jumper wires, connector housings, and pin headers.

2. Insert the terminals in the terminals of the pushbuttons.

3. Use needle-nose pliers to connect the terminals and the jumper wires.

4. Insert one end of jumper wires in the connector housings.

5. Use needle-nose pliers to separate the pin headers and insert them in the connector housings.

Step 3: Step 3: LEDs Circuit

The photo above shows the setup of the project. First, we connect the circuits of the LEDs. The jumper wires should be connected as follows:

First,

Connect a jumper wire from the 5-volt pin on the Arduino to the bottom channel of the breadboard

Connect another jumper wire from a ground pin on the Arduino to the upper channel of the breadboard

Second,

LED1 and LED4 -> red LEDs

LED2, LED3, LED5, and LED6-> yellow LEDs

LED7 -> blue LEDs

LED8 -> green LEDs

(In Order from Right to Left)

LED1 -> D-pin 4

LED2 -> D-pin 5

LED3 -> D-pin 6

LED4 -> D-pin 7

LED5 -> D-pin 8

LED6 -> D-pin 9

LED7 -> D-pin 10

LED8 -> D-pin 11

Third,

The jumper wires connected to the positive pole (long leg) lead of the LED should be connected to D-pins, while the negative pole (short leg) lead of the LED should be connected to the ground channel via a 100-ohm resistor.

Step 4: Step 4: Photoresistors Circuit

The photo above shows the setup of the project. Second, we connect the circuits of the photoresistors. The jumper wires should be connected as follows:

First,

Photoresistor1 -> A-pin 0

Photoresistor2 -> A-pin 1

Photoresistor3 -> A-pin 2

Photoresistor4 -> A-pin 3

Photoresistor5 -> A-pin 4

Photoresistor6 -> A-pin 5


Second,

The jumper wires connected to one leg lead of the photoresistor should be connected to A-pins, while another leg lead of the photoresistor should be connected to the ground channel via a 100-ohm resistor.

Step 5: Step 5: Buzzer Circuit

The photo above shows the setup of the project. Third, we connect the circuits of the buzzer. The jumper wires should be connected as follows:

First,

Buzzer -> D-pin 12

Second,

The jumper wires connected to one leg lead of the buzzer should be connected to D-pins, while another leg lead of the buzzer should be connected to the ground channel.

Step 6: Step 6: Buttons Circuit

The photo above shows the setup of the project. Last, we connect the circuits of the buttons. The jumper wires should be connected as follows:

First,

Button1-> D-pin 2

Button2-> D-pin 3

Second,

The jumper wires connected to one leg lead of the button should be connected to D-pins, while another leg lead of the button should be connected to the ground channel via a 100-ohm resistor.

Third,

The circuit is finished. (As photo)

Step 7: Step 7: the Codes

I wrote the codes by the Ardublocks.

Now that you have finished the physical setup of the build, now its time for the code. I assume that you already have the Arduino program on your computer, so now all you have to do is copy and paste the code from the link.

The Link of the codes:

https://create.arduino.cc/editor/j06098/0ca7a719-d...

Step 8: Step 8: Cardboard Cutting

After we finish the circuit and the codes, let's make the appearance. First, we cut down the cardboard by the box cutters.

The photo above shows the cardboard. The cardboards should be cut as follows:

  • Board1 and 2 -> (2x) 36x30, Board1 needs to be cut like the first photo shows
  • Board3 and 4 -> (2x) 36x10, Board3 needs to be cut like the third photo shows
  • Board5(s) -> (2x) 30x10
  • Board6(s) -> (4x) 4x4
  • Board7(s) -> (6x) 4x4 with 2x2 hole, as the eighth photo shows
  • Board8(s) -> (30x) 2x2
  • Board9(s) -> (2x) 2.8x2.8

Step 9: Step 9: Package

The last step, package them!

First,

Preheat (Plug in) the glue gun.

Second,

Glue Board2, Board3, and (2x)Board5 together. (As the first photo shows)

Third,

Glue (30x)Board8 together, into tubes that only have five planes(sides). (As the first photo shows)

Fourth,

Dig a hole in the bottom of the tubes, and put the photoresistors into the holes.

Use the glue gun to fix them.

Fifth,

Color the Broad1 and Broad9s.

My project has a big problem, I'm going to fix it.

Step 10: Step 10: Finish

Be the First to Share

    Recommendations

    • Back to School: Student Design Challenge

      Back to School: Student Design Challenge
    • Tinkercad Student Design Contest

      Tinkercad Student Design Contest
    • 3D Printed Student Design Challenge

      3D Printed Student Design Challenge

    Comments