General Engineering Projects/Arduino based Tic-Tac-Toe/Project 1
Introduction[edit | edit source]
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
Play the game automatic Computer vs. Player
 - 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
- 4 Breadboards
- 9 RGB LEDs one color for Player1(X) one color for Player 2(O) and one for the reset
- 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[edit | edit source]
The group chose to proceed with the button idea
Project Phases[edit | edit source]
|Prototype version 1|
The group started with the circuit by adding one led to the breadboard and Light for a second but then blew. So research more about and try to find out the why led blew up and we found out the led has only a certain amounts of resistance, without high enough resistance their will be to much voltage which will cause the LED to blow up. So added a resistor for color and reconnected the LED by connecting each wire from the breadboard socket 5 abcd(picture) A being the green light B being the blue light C being cathode(base for charge) and D being the red light to the battery. After this we managed to get the LED to light and finally understood how electricity flows through the circuit board. Another one of the issues we came across when trying to light up the LED was that the wire didn't draw enough current flow between the LED and battery.We tried connecting the wires together to if that will draw enough but unfortunately the it didn't draw enough current. So we checked out more wires from the ENES lab and we found wires how a better connection that will the current to flow thought the circuit. Through our struggle we managed to get one of the LED`s to blink blue and green by using momentary switches and we learned that when an LED it important have resister for each wire the
This week finished and later the group was able to wire up six led and our professor group has been chosen to give a presentation to the semester so brainstorm some we can explain the project in depth and discuss our future plans.After the presentation we realized there is a lot that needs to be done.
1. We need to find another way cover up the wires on bread rather than a shoe box
2. Our project design doesn't resemble the typical layout of the tic tac toe broad.
3. Although we think it would be best to stick player vs. player Tic Tac Toe due to the amount of time we still feel that player vs. computer is something we should consider working on in the future.
The Prototype was rewired with only momentary switches that when pressed the LED is on and when release the LED is off. After understanding the circuit the we continuing adding three more LEDs to the ciruit and was able to have a frist prototype with a basic layout of the game.
|Prototype version 2|
This final Prototype does not follow our initial designs plans for programming the code that will have a computer vs a player. Prototype is wired obtaining it power from a 9 volt battery with only momuntery switch that keep the LED lit when pressed.
Future Plans For Coding[edit | edit source]
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[edit | edit source]
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[edit | edit source]
We need to find another way cover up the wires on bread rather than a shoe box
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.