evantimms / arduinoMinesweeper

Minesweeper on an adruino! Uses a couple extra parts like a potientometer but will work with just a joystick and a lcd touchscreen. Uses the adafruit gfx library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ben Ripka
ID 1465622
Evan Perret Timms
ID 1504825

Notes: Some code(along with comments) provided in class was reused indirectly throughout the assignment
accessories:
*1 Arduino Mega Board
*1 joystick
*1 LCD screen
*1 SD card w/ map of edmonton+restaurant data

Wiring: from bottom to top on the right side (the side with the pins).

Board Pin <---> Arduino Pin
===========================
GND             GND
Vin             5V
3Vo             NOT CONNECTED
CLK             52
MISO            50
MOSI            51
CS              10
D/C             9
RST             NOT CONNECTED
Lite            NOT CONNECTED
Y+              A2 (analog pin)
X+              4  (digital pin)
Y-              5  (digital pin)
X-              A3 (analog pin)
IM0 - IM3       NOT CONNECTED (they expect a 3.3v signal, DON'T CONNECT!)
CCS             6
CD              NOT CONNECTED

===========================

Joy Pin <---> Arduino Pin
===========================

GND						GND
5V						5V
VRx						A1
VRy						A0
SW						2

===========================

Instructions:
1. Insert SD card
2. Compile and upload code

Features:
1.Playing board that is navigable with the joystick
2.Algorithm that places a certain number of mines based on the difficulty selected
before the game begins
3.Pressing the button on the joystick will clear surrounding spaces that do not
contain the mines
4.Numbers will be displayed on tiles that are adjacent to mines. The the
number displayed refers to the number of adjacent mines
5.Clearing all the free spaces will result in a perfect score
6.Score is counted based on number of cleared spaces
7.At the end of the game the score will be displayed on the screen, then after
certain time period it will restart.
8.Separate button for flag placement
9.'Custom' game mode which uses a potentiometer to adjust a certain number of 
mines


1st Milestone: v0.07 23/11/2017
	-Playing Board implemented which cursor controlled by the joystick that is
	able to navigate the screen. Pressing the button on the cursor on top of a mine
	will end the game
	-Algorithm places mines(not based on difficulty, just set value)
	-Board does not clear spaces
	-Score function structure is present but not functional

2nd Milestone:

About

Minesweeper on an adruino! Uses a couple extra parts like a potientometer but will work with just a joystick and a lcd touchscreen. Uses the adafruit gfx library.


Languages

Language:C++ 84.4%Language:Makefile 12.2%Language:C 3.4%