Arduino Board Game - Minesweeping

by elastaticy in Circuits > Arduino

252 Views, 1 Favorites, 0 Comments

Arduino Board Game - Minesweeping

Board game - Minesweeping Demo
minesweeping.png

An Arduino based board game with easy steps.

Supplies

AD319-2.jpeg
led-1.jpeg
67e841b6b11f86781fc2caf2c1569e35.jpeg
aluminium-foil-paper-500x500.jpeg
13995348110_2.jpeg
tamiya-74155-hg-tweezers-grip-type-tip.jpeg

Aluminium foil

LCD Screen

buzzer

LED

Buttons x2

Tweezers (made of metal)

Breadboard

Some jumpers wires

Wiring

IMG_9292.JPG

const int startPin = 2; // tweezer

const int buzzer = 4; //buzzer

int ledPin = 13; // red led

int start, end_;

int homeScore; // player1

int visitorScore; // player2

const int buttonHomePin = 6; // green button

const int buttonVisitorPin = 7; // blue button


You can connect the components by my code.

You should connect one jumpers wire to GND for and a long one to digital pin 2.




Handcraft

IMG_9288.PNG
IMG_133611.png

For the board design, it actually can be everything with some holes on it.


I use a three layers design here:

Top : the final interface design of your game

Middle : a thick cardboard with holes on it

Bottom : a cardboard coated with a aluminium foil with jumper wire connected with pin 2

(remember to the aluminium foil should be in one piece to make sure it can connect with electricity.)


I use glue and aluminium foil tape to stick on the cardboard and stick it with the jumper wire which connected to the ground.

Then I connect the tweezer to the jumper wire which connected to pin 2.

If the tweezer touch the aluminium foil, the circuit will be complete and the Arduino board will read a LOW.


if (start == LOW ){

digitalWrite(buzzer, HIGH);

digitalWrite(LED_BUILTIN, HIGH);

Serial.println("buzzer on, led on");

delay(300);

digitalWrite(buzzer, LOW);

digitalWrite(LED_BUILTIN, LOW); }

The LCD Monitor

IMG_9293.PNG

The lcd monitor will be our scoreboard and it did't count mark automatically. Which means player should press the buttons in order to keep score.


P1 = green button

P2 = blue button


When user press the green button, the lcd will add 1 on the score of P1.

There are many tutorial that teach you how to use an lcd monitor and you should install a zip file of the library of LiquidCrystal.h which will work well on the 16x2 lcd display.




Final Look

IMG_1341.png
IMG_1337.png
IMG_1340.png

It is the final look of my game and I have find some buttons that can be put on the holes.

It is a really simple game that every can try to do at home.

Welcome to leave comments and I will reply as soon as possible!

Have Fun! :D