Friday, June 1, 2018

Week 9

The week 9 class was the last class period to finish up the project. The group made a few alterations to the code for clarity, but mostly worked on the final presentation. Group 7 is set to present the final project at 11:42 am next Friday (June 6th, 2018) in Drexel's Innovation Studio room 233. Below figure 1 is a video taken during class of a sample win of the game.

Figure 1.
A short video of sample game play.

Friday, May 25, 2018

Week 8

The final assembly was completed during the week 8 class period. Prior to class, the .stl file of the final model was sent to the teaching assistants so they could 3D print it in one of the larger 3D printers. Figures 1 and 2 show the model.
Figure 1.
A model of a case to enclose the electronic components.

Figure 2.
A view of the bottom of the model.

Only a small part of it needed to be filed down in order to fit the components inside. Figures 3 and 4 show the final assembly.
Figure 3.
The final product at an angled view.

Figure 4.
The final product front view.

More pictures can be found here.

Friday, May 18, 2018

Week 7

Before the week 7 class, a group member 3D printed the case for the game. In class, the support material was removed from the print and the group attempted to place the Arduino inside. Although the model left space to hold the Arduino, there is not enough space to put it into the case. Therefore, class time was spent remodeling the case so it can be 3D printed again. The figures below show the 3D printed case and the new model.

Figure 1.
Top view of the 3D printed case.

Figure 2.
A view of the left side of the 3D printed case, where openings for the USB port and battery connector are visible.

Figure 3.
A view of the case in a right-side up position. The left side is larger to encase the battery and have space for a USB cord and battery connector.

Figure 4.
The updated model for the case, to be 3D printed. It will likely need to be printed in two pieces to fit in the 3D printer.

Also during class this week the program was updated so the game can recognize if a player has won. Once a player has won, the game board clears and then blinks the number 1 or 2 (depending on which player has won). While the code could be considered complete, the group will likely make some changes for efficiency in the remaining few weeks.

Friday, May 11, 2018

Week 6


During the week 6 class, the group planned to 3D print the case for the game. However, all of the 3D printers in the Innovation Studio were out of service, so a team member plans to come back every day next week until they can print.

For the majority of the class period, the group worked on the final report draft.

The group also started implementing code so the game will know which player has won. While not every case is accounted for as of yet, a few winning cases are recognized. When a player has won, the game will flash either a 1 or a 2 in the winning color. The pixels to be lit for the numbers are shown in Figure 1.

Figure 1.
Diagrams showing the index of lights to be lit to show either a 1 or 2.

Figure 1 shows the number 2 displayed in red. However, due to a hardware issue, the red lights vary in intensity and do not always work, so the group switched player 2 to green.

Outside of class before next week the group will complete the final report draft.

Friday, May 4, 2018

Week 5


During the week 5 class, the group started off by soldering four wires onto the matrix driver. The group worked together to solder, one member doing two wires and the other two members each soldering one. These four wires allow the joystick to be connected. The connections can be shown in figure 1 and 2 below.

Figure 1.
An image showing the connections between the joystick and driver.

Figure 2.
An image showing the soldering connections on the driver.

The red wire connects to 5V, the black wire to ground, the blue wire to the third analog port (A3) for the x potentiometer, and the fifth analog port (A5) for the joystick button.

The group also worked on the program this week. As of the end of the week 5 class, the connect four game is playable, but the program does not yet recognize the winner of the game. It starts off with a blue light in the upper left corner, which moves left/right depending on player 1's movement of the joystick. When the button is pressed, the blue light cascades down the column to the last available space. Then it switches colors to red and does the same thing for player 2's turn. Eventually the program will be able to recognize when one of the players connects four of their color in a row. Figure 3 below shows a sample game, where player 1 (blue) has won (on the diagonal).

Figure 3.
A sample game of Connect Four where blue has won.


Friday, April 27, 2018

Week 4


During week four, the group figured out how to use the Colorduino library to control a single LED on the matrix. Using this knowledge, the group spent this week coordinating the joystick's movements with and LED on the matrix.

In order to do this, the driver had to be plugged into a breadboard and connected to the Arduino with wires, rather than being plugged into the Arduino directly like usual. This is because the driver uses all of the pins on the Arduino and therefore would not allow room for the joystick to be plugged in. Plugging it into a breadboard allowed the extra pins on the Arduino - that are normally filled by the driver but do not connect anything - to be used for the joystick. Eventually, this connection will have to be soldered. Figure 1 below shows these connections.

Figure 1.
An image showing the matrix driver and joystick module connected to the Arduino with wires.


The program the group worked on this week started by lighting up the top left corner, or the light at position (0,0). Then if the joystick is moved left or right, the LED that is lit will move left or right, staying in the 0th row. This will correspond to the selection process in the game, in which the player moves the joystick left and right to choose a column to place their piece. Figure 2 shows the indexing of the matrix.

Figure 2.
An empty 8x8 matrix with indexes on the side.


Also during week four, minor adjustments were made to the model created last week. Major adjustments cannot be done until the components are soldered and the final measurements can be taken.

Sunday, April 22, 2018

Week 3


Before the week 3 class, the RGB Matrix and Driver shield was ordered from Amazon and arrived two days later, so it was ready to use during the week 3 class. During class, the group started to learn how to use the RGBMatrix library that came with the part, along with a Colorduino library found online. Working with one of these two libraries should allow the group's program to control individual LEDs on the matrix, which can then be used to program the final game.


Figure 1
A smiley face displayed in blue LEDs on the matrix.

Figure 1 shows a smiley face displayed in blue LEDs, which is a built-in picture to the RGBMatrix library.


Also during the week 3 class period, a preliminary design for game case was modeled in Solidworks. Though figure 2 is just a first sketch and will need to be modified to fit every component, it shows the general shape the group is looking to make the case.


Figure 2
A first design of the case to encase the electrical components.

Saturday, April 14, 2018

Week 2


The day before class during week 2 the group met up to put the finishing touches on the design proposal and submit it.

For the week 2 class, Jessica brought part of her Elegoo kit to class. She had pre-assembled a circuit to help work on the programming concepts that will be required for this project. The circuit consists of eight LEDs in a row, each connected in series with a 220-ohm resistor and plugged into eight separate digital ports on the Arduino. Each LED is also connected to ground. It also includes a joystick module, which is plugged into ground and three ports on the Arduino: one analog port for the x direction, one for y direction, and one digital port for the center button. It also includes a stand-alone button plugged into ground and one digital port. Figure 1 below shows a model made on the program Fritzing of the required connections. Figure 2 is an actual image of the circuit.


Figure 1.
A model of a circuit to test preliminary programming concepts. 

Figure 2.
An image of the circuit modeled in Figure 1.

When given power, this circuit is programmed to turn on a certain LED based on the movement of the joystick. Figure 2 shows the right-most LED being selected. By default, the left-most (red) LED turns on, leaving the rest off. If the joystick is moved right, it will turn off the currently lit LED and light up the one to the right. It also performs the same functionality to the left. The stand-alone button resets it, returning to the default set up of the left LED lit. This functionality will aid in programming the horizontal aspect of the final project.

During class the group also worked on a different program for the same set-up. The second program uses the button on the LED. When the button is pressed, the first LED will blink on, then the second, all the way down the line to the bottom, leaving the eighth LED lit. After the first iteration of trailing lights, it would look like figure 2. When pressed again, it will follow the same pattern and keep the second-to-last LED lit. This works all the way up to pressing the button an eighth time, turning on the first LED (at which point every LED is lit). The button on the side resets the LEDs, turning them all off. This functionality will be similar to the vertical aspect of the final project.

Also during class, the group's proposal was approved and given suggestions.

After week 2 class, the RGB LED matrix and driver shield was purchased from Amazon for $19.99. With Amazon Prime two-day shipping, the group expects to be able to work with the part for the week 3 class.

Friday, April 6, 2018

Week 1

During the week 1 class period, the group was formed, decided on a project idea, and started to determine where to get supplies.

The idea is to make a Connect Four game using an Arduino and an 8x8 matrix of red-green-blue (RGB) light emitting diodes (LEDs). The game will be controlled with a joystick. The entire game - Arduino, circuitry, etc. - will be encapsulated by a 3D printed box to make the game hand-held.

The materials, supplies, and software to make this project potentially include
  • Arduino UNO
  • USB cable
  • 8x8 RGB Matrix
  • Colorduino or similar LED driver shield
  • Joystick module
  • Female-male (FM) wires
  • Jumper wires
  • Breadboard
  • 9 Volt battery
  • Battery pack

  • Soldering equipment
  • 3D printer

  • CAD software
  • Affinia Studio
  • Arduino integrated development environment (IDE)

Of these supplies, only the 8x8 RGB LED matrix and driver need to be purchased for this project. The rest of the supplies can be provided by Jessica (who owns an Elegoo SuperStarter Kit) or Drexel's Innovation Studio.