# General Engineering Projects/Arduino based Tic-Tac-Toe/Project 1

Group members
    Ruggieri Guillaume,
    Nathan Minnick,
    Abu Lamin,
    Patel Utsav

## Introduction

Research
- We found that this prototype was very intricate which required a lot time and a vast knowledge of AVR Micro-controllers and due to our limited knowledge of AVR Microcontroller and amount of time we decided to steer a different direction
This example prototype seemed better to work on for our project and give the group some ideas for our project. With to we can find out what sort of tools that the group will need to complete this project. We noticed that the LEDs he had in the video lite with either a green or blue color. These LED are called tri-color led the different colors are to distinguish between player 1 (X) and player 2 (O)
We are going to brainstorm different ways to operate this game
Play the game manual player vs player
or
Play the game automatic Computer vs. Player
Starting Point
- Our initial idea is using player vs. player mode. If we finish with this we can start working on Player vs. ComputerWe are finding what objects we will be using to hold on to the circuit-board. We realized that we will need 18 LEDs. We decided that our circuit board will .We were thinking of creating a design that would allow us to play against the computer.We also discovered that if we find tri-color LEDs that can light up in different colors then only nine LED will be needed
Materials
* 4 Breadboards
* 9 RGB LEDs one color for Player1(X) one color for Player 2(O) and one for the reset
* Wires.
* 18 Push buttons
* 9 volt battery
* 27 Resistors to regulate the energy flow so the LEDs does not blow due to the large amount of current that energy flow of the LEDs
* Button - We use buttons as mark for player 1 or player 2
* Arduino uno - the coding program to light the LEDs

## Design

The group chose to proceed with the button idea

## Future Plans For Coding

This week the group has nearly finish constructing the prototype by wiring the last three LED's breadcircuit.(picture) Right now the group finished testing the switches to light the LED's.(picture) The switches keep the LED light after the switch is pressed, the group wants to construct the circuit in a way that the LED will stays on after pressing the switch the until the game is reset or until the board is filled.But in order to do that we will appropriate codes for Ardunio. One of the group members friends knows He knows how to code with Java but we havent using Java on Adruino so if it does not work we would have to change the code to be used with Arduino. The group will test the codes with the circuit. the group might have to update the coding to fix any bugs and problems so that the code will follow the group's criteria of how we what the tic tac toe game to work. The one of group member was working on tring get java to for Arduino in order to work on our Computer vs. Player portion of the project to but it turn out that Ardunio is unfamiliar of some of the language that Java.
However,there is program on the arduino that will allow it to run random number that will send an output to LED color and loop which will allow us to play a game link below show how the random function works:
In the end of the arduino tic-tac-toe project where a player will have the opportunity to play with a computer that is compatible with their intelligence.Similarly to this demonstration with out the touch pad:

## How the game will work

We are planning on building a tic tac toe game where a player can manually play against a Computer the first step of the project the group decide to develop and understand the basic circuit design and Arduino coding designs.
-The player will go first,He chooses blue(x)
-Computer will then be able to detect the spot you pick and eliminate that from on of choices and send an output to a random any LED on the game broad.
-The player will go next and and the Ardunio will repeat the process.
-And cycle will continue until there is a winner

## Issues

Our project design doesn't resemble the typical layout of the tic tac toe broad. Our group had a problem with some of the LED's because one led was too dim to be used and another led did not lit a green color which is needed to tell the players which turn it is. In order to prevent that the group could have to done more research on different way to use adrunio random and continue to play with the breadboard on 123d.
One of our big problems was coding the Arduino and forming the computer. So we have invited one of Abu Bakar friend who has some computer program experience and will assist us with the Arduino The other down fall to this was that he was unfamiliar to the language that is used in Arduino. Initially the group was thinking of using the java script for the computer. Ardunio is unfamiliar of with the language of Java. . It has come to my realization that when we run this program the adruino will pick any random number which means that it could possible pick the same LED twice.
The switches we used in the past week only keeps the LED light when the switch is pressed, however when the switch is released the LED turns off.