Heroes of Hammerwatch Puzzle on an Arduino
by GokudoG in Circuits > Arduino
1401 Views, 1 Favorites, 0 Comments
Heroes of Hammerwatch Puzzle on an Arduino
Hello everyone ,this is my first intructable and english isn't my first language so be free to correct me where I am wrong.
In this instructable I will show you how to make a puzzle from the game Hammerwatch using arduino.
Supplies
What you will need:-
1- Arduino uno.
2- 9 switchs with built in led.something like https://bit.ly/2QTvfi6 or https://bit.ly/2QQBGlX
3- Some wires.
4- Finishing box 3d printed or from wood.
5- Battery with battery holder for the arduino.
6- On off switch (optional)
7- Soldering kit.
Wiring
You may want to test the circuit before soldering ,if all is good then start soldering.
First you should number your switches from 1 to 9 like this
1 2 3
4 5 6
7 8 9
Then connect your grounds together, then to the arduino ground.
Connect the led pins of the switchs to the led pins on the arduino (pin 5 to pin 13). so Led 1 will connect to pin 5 and Led 9 will connect to pin13.
Connect the switch pins to the switch pins on the arduino.(pin2,3,4 and from A5 to A0).switch 1 will connect to pin2 and switch 9 will connect to pinA0.
Be very careful not to mix them up ,if by any chance you did ,don't worry you can just change the code instead of resoldering.
The Code
Connect your arduino and upload the code.
And that's it enjoy the puzzle.
Downloads
How the Puzzle Works
The goal of the puzzle is to light all the 9 switches at the same time.
When you press a button it's mode will change, if it's on, it will be off and when it's off it will switch to on, and that will also happen to the adjacent buttons(up, down, left and right)
https://www.youtube.com/watch?v=OM1XD7IZ0cg
Upgrading
You can upgrade the puzzle by:-
!- adding more buttons so it becomes like this
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
2- adding speaker.
3- adding rgb led so every time you press the button it will change the light color but it will be very very hard to solve.
4- Add time or steps score.