Introduction: Arduino Board Game - Minesweeping

An Arduino based board game with easy steps.

Supplies

Aluminium foil

LCD Screen

buzzer

LED

Buttons x2

Tweezers (made of metal)

Breadboard

Some jumpers wires

Step 1: Wiring

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.




Step 2: Handcraft

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); }

Step 3: The LCD Monitor

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.




Step 4: Final Look

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