Introduction: Cowboy Duel Game
I made this project for school(HKU Games&Interaction, Netherlands). With the idea to mix laser cut wood with technology(Arduino Yún) and make a small game out of it.
My inspiration was a small mini game from Kirby on the NES. Which has this cowboy duel mini-game. The idea is that two players play a game where they have to push a button at the last beep sound of a countdown. The player that pushes first shoots(his/her cowboy rotates his arm) and wins. They can play another game by pressing the reset button and then the countdown start again. It's just a simple entertaining game for kids and adults.
In the next part, I'll explain how it started and how I made this project.
Step 1: Step 1: Setting Up the Arduino Yún.
So first to begin with a confession, I'm a total noob with programming. It's like reading Japanese. So I had a big challenge in front of me. First I wrote what I needed and what the Arduino needed to do and made a list for it.
- It needs to have 3 buttons, 1 for each cowboy(2 in total) and 1 reset button.
- It needed 2 servo's to operate the arms.
- A buzzer to make a countdown sound.
- A breadboard.
- A printed circuit board.
- And some LED for testing
I first needed to test if the button mechanic would work, so I tested it with some LED lights. To test if the who presses first would work. I made it so that the Arduino finds out who presses first and blocks the other button. Then the player who pressed first would see his LED would light up. After that, I began testing the servo's. They needed to turn 90 degrees so they would point at the other player when activated. I did encounter some troubles due to the right cowboy needed to be programmed in reverse. As an example; The left had to turn from 0 tot 90 so the other one had to turn from 90 to 0(both not the precise degrees though, used will be shown in code). After that I made a mechanic so the buzzer would do a countdown with 4 beeps and the players can press when the 4th beep is produced.
This is basically how it works. I'll show my code in a picture so fellow enthusiasts can use it as well.
Step 2: Step 2: Laser Cutting
This is just a small step, but I'll talk about the laser cutting step. First of all, if you want to both laser cut and engrave the wood, you need to make each a different layer. I made the mistake and by making the file in Photoshop and import it to Illustrator. I do recommend using Illustrator right away. The line you want to laser cut just has to be a vector line and it needs to connect to each other. Everything that needs to be engraved has to be one layer of vector shapes. You can see the file I used in the pictures above(which I edited while laser cutting, so this one is correct). What I needed to be laser cut was;
- 2 cowboys, made 1 and mirrored the other.
- 2 cowboy arms, made 1 mirrored the other.
- 5 sides(the back is open), the top needed holes for the buttons and the cowboys(although something went wrong and had to glue them on).
You can see the results above in the pictures.
Step 3: Step 3: Finnishing the Project
The last steps where to put it all together and make it work. I build in the Arduino and breadboard and installed the buttons and made sure the servo's were on the right side. Then I glued on the cowboys and attached the servo's on the right place. After that, I glued on the arms and began testing the rotation of the servo's. You can see the back of the cowboys and the inside of the box in the pictures. Unfortunately, I only got a small video due to my Arduino died on me last night(you can see it above this post).
I'm very happy with the results. It was defiantly an interesting project to work on. My uncle helped me understand the code and helped me build it. Although I liked this project I don't have any plans on working with the Arduino in the future, but laser cutting is something else. I still got some wood left and plan on doing something with it in the future. Thanks for reading my instructable and hope you liked it. Sorry for the bad English(if there is any).
We have a be nice policy.
Please be positive and constructive.