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.