Our schematic diagram. We connect Arduino to the breadboard, then connect the 8x8 matrix, then connect the ultrasonic sensor. (The diagram only shows the concept of what components would be used)
Design Ideas
1. First, come up with an idea of what kind of games we can do on an 8x8 led matrix. Since the sole restriction on our project is using an 8x8 matrix, we start from this.
- Game design:
- Snake game
- Tetris
- Display animations or scrolling text: we can create custom animations or scrolling text on the LED matrix using simple programming techniques. --> Our project is based on this design
- Tic Tac Toe
- Make a clock: You can program the LED matrix to display the current time and date, with various fonts and styles. --> removed because it is not a game
- Make a mini arcade game: You can design and program simple arcade games, such as Space Invaders or Pac-Man, and display them on the LED matrix.
- A scrolling text display --> removed because it is not a game
- An animated character or sprite display --> removed because it is not a game
2. Since we are developing a game we would need an input device of some sort
- Input device design:
- Buttons
- Joysticks
- Gyroscope
3. Any other extra features in the game
- Snake game
- use different colors for the snake and the apple
- Tetris
- Use different colors for each block
- Use different types of blocks than traditional Tetris (use a combination of 5,6,7,8 blocks instead of only 4 blocks)
4. Initial choice for the game
Our team started with the goal of developing a snake game or Tetris in mind. However, as we go into the developing period, we changed our goal to displaying an animation with user input. The major reason to change the design is to change user input from traditional buttons or joystick to the moving motion of the user.
After building the led matrix, we had a new idea for interacting with an input. Instead of using traditional input such as buttons or joysticks, we want to use some kind of sensor. From this step, we came up with two ideas: implementing a wave of lights or moving fire-like lights with input from the user. With input from the user using an ultrasonic sensor, the user can wave their hand over the sensor to generate wave-like motion. the sensor will detect the distance between the sensor and the user. We can display the motion from the user in the led display which will become the wave of lights.
Demonstration
when a user approaches the hand closer to the sensor, the lights will start light up and move with the direction of the hand (from right to left or another direction as well)
Steps on building a kit
1. Assembling the Arduino kit
First, we start assembling the Arduino kit with the 8x8 LED matrix. The very first step is to connect an Arduino nano to one of the breadboards. Then we connect the 8x8 LED matrix. To wire the 8x8 LED matrix, we had to look up the circuit diagram. We need to find which side is a row and which side is a column. Also since our 8x8 LED matrix has two color options (red and green), we chose the red to start with (note that we did not use any registers because we are building a prototype and we want to have a brighter light - suggested by TA). Once we connect all the wires to the Arduino nano and ground, we connected the ultrasonic sensor to the breadboard. For the sensor, we can connect power, ground, echo, and trigger.
2. Designing with input and output
Our primary goal in building this device is to have user input. We used an ultrasonic sensor to receive user input. The output is displayed in the 8x8 LED matrix.
3. Writing a code
Our code is rather simple. We initialize each port that is connected to the 8x8 LED matrix. We also initialize the ultrasonic sensor. Then we control each column of lights. Finally, we define distances for each row.
Challenges
As a computer science background person (both members in this project), it was extremely difficult to understand when connecting all the components.
Two major challenges:
1. Getting the led matrix to display the format of natural wave-like light.
2. Getting accurate input from the ultrasonic sensor.
To display the wave-like lights on the 8x8 matrix, we would need a matrix with more led so that they would look more natural. Also in future work, we might need to implement different heights of light for each wave.
As for the input from the sensor, we are currently using only one sensor. The current sensor can detect the motion as an input however it is difficult to capture natural wave-like motion. Since the sensor detects the distance between the sensor and the user, there is a dead spot or time frame where it does not smoothly transfer the lights across.
Future Work Ideas
We want to continue building our device to be a more natural device. Overcoming two challenges and improving would be the first step to take.
Also building a more robust casing for the device would be aesthetically more pleasing. Possibly using some kind of plastic box or cardboard box would be the next step.
Discussion
From this project, we have learned a lot. Especially both in design and technical areas. For the design area, we learned that we need to have as many designs as possible because there is most likely to be an issue with an initial design so the second plan can be useful.
Another lesson is that learning on using new hardware takes quite a long time and effort to implement. Coming from a computer science background team members, building a connection with wires took a lot of effort. Especially when some parts fail, we don't know if either part failed or we are doing something wrong. The most challenging part was unable to clearly see the error from a lack of experience in this field (in programming, we can most likely get some kind of error message which was triggered by the specific error).
To overcome these issues, for the next projects, we need to spend more time designing and spend more time to build our design with trial and error.
Inspirations
Our work was initially inspired by the color of the light and the movement of the light. Since we can use the bright red color of the lead in the matrix, we thought of light from the fire. The led matrix also can have a movement within the matrix, we thought of displaying something like a fireplace.
Our work was inspired by this video [1]. This work used motion sensors in the smartphone however our input is from an ultrasonic sensor.
We had such cool ideas for building a snake game or Tetris.
This video [2] inspired us the most because they used a regular plastic box to make the whole device look like a real hand-held game device.
References
[1] LED Matrix wave move with hand: https://www.youtube.com/watch?v=Ggh-dzsLDNs&ab_channel=mostafaahmed
[2] Arduino TETRIS Game DIY: https://www.youtube.com/watch?v=ubjZNSds_cw&t=22s&ab_channel=Hacktuber
Comments
Post a Comment