top of page

ARDUINO CONTROLLER

TEMPLE RUN GAME CONSOLE

Team Members: Tatiana Tabrani, Michael Sabourin, Josh Dochoda, Thy Vu

This assignment required my team and I to design and build an Arduino Controller for users to interact with any software program already existing. The controller has to be designed around a sensing device, using real-world input. There are several learning objectives to this assignment. They are, to use the Arduino UNO platform to acquire sensor data and produce inputs based on its analysis, to use the signals generated by the Arduino UNO board to control entities in a virtual environment and to apply ergonomic principles to the design. 

 

            To begin, we were handed a few different sensors, including the potentiometer (Figure 1) and light sensor. This allowed us to familiarize ourselves with how the Arduino UNO works together with various sensors, and how to code not only for the Arduino, but how to link it up with Python as well. This practice allowed us to visualize the process as a whole, giving us an opportunity to brainstorm on various design and functionality ideas. 

Potentiometer.JPG

Figure 1 - Potentiometer

Screen Shot 2019-03-07 at 10.06.31 PM.pn

Through the first stage process, my team and I iterated through various ideas. However, we narrowed it down building a game controller, specifically for ‘Temple Run’ (Figure 2). The reason being, this game required the use of the motions; jump, duck, left and right, and with many online games, these are the main inputs required for the game to run. Hence, the controller could be used for a variety of online procedures, including moving the space bar around on a Word document. Furthermore, we were aware that this design would challenge us to a good extent, and it is within our capabilities to produce a high quality piece that worked to our expectations. 

The 2 significant aspects of the console are on both the software and hardware of the design. They work hand-in-hand to create the optimal console. I will further elaborate on them in separate parts as follows. 

 

Software

The game console required the use of an accelerometer. This was the most crucial piece of software we had to ensure worked well with the Arduino as it would receive the inputs from the user and thereafter send it through the Arduino Code and to the Python Code. To gather the specific numbers being produced by the accelerometer via different movements, we soldered wires between the accelerometer and the Arduino UNO board. We did the movements as the user would in the game, and observed the data as seen on the Serial Monitor. From this, we knew the range of numbers for ‘up’, ‘down’, ‘left’ and ‘right’ and could then input it into the Arduino Code (Figure 3). As for the Python Code (Figure 4), we used the template presented and built on it, and matched various variables to coordinate specifically with the Arduino code.  

Arduino Code SS.png

Figure 3 - Arduino UNO Code 

Python Code SS.png

Figure 4 - Python Code

Hardware

The main component, since this is an assignment from a design class, was the design of the body console. The assignment had several criteria for the design including, functionality, ease of manufacture and maintenance, cost, craftsmanship and the appeal to users. 

 

My team and I iterated through various designs including hand-held, a head strap and a body strap. However, we decided to go with a hand-held because we could not figure out how to accurately calibrate the accelerometer for the jumping and ducking motions by the user. Each user would be of a different height, and if we make the range of numbers too big, it would decrease the response by the program and the product would not work as efficiently as we hoped it will. 

 

While designing the hand-held console, we ensured to take into consideration the importance of ergonomics we had learnt in the previous assignment (Hot Wire Tool). For this, we ensured to create the width for the palms and fingers so that it would fit the hands of the biggest person on the team. We also made certain to round any corners or sharp parts to prevent injuries to the user. Most importantly, we ensured the design was comfortable for users to use for a certain period of time. As for the cost, we made sure the cavity design was big enough to fit the software components, but minimized the other parts to ensure as little as material could be used to manufacture the console. However, because the part would be 3D- printed, it was also restricted to the specifics of the 3D printer. Below illustrates the part drawing (Figure 5), and the actual output after being 3D-Printed (Figure 6). 

drawing SS.png

Figure 5 - Drawing of Body 3D - Printed​

Body 1_edited.jpg

Figure 6a - Body

Body 2.JPG

Figure 6b - Body (Side view)

The 3D printer worked perfectly, and we were able to fit all the software components into the cavity created.  

Body w_ Arduino 1.JPG

Figure 7a - Body with Arduino UNO Placement (without Velcro)

Body w_ Arduino 2.JPG

Figure 7b - Body with Arduino UNO (Side view )

A new aspect introduced to us during this assignment informed us of the importance of aesthetics. The design had to be appealing to the consumers, and easy to disassemble and assemble for users. The Arduino is attached to the base of the cavity in the body with Velcro, allowing users to easily remove the Arduino, but being able to place it back on the correct orientation and spot. Furthermore, because the accelerometer was coded for a specific axis and calibration, it is Velcro onto the free surface of the Arduino, to ensure it is always in the correct orientation, should the user decide to detach it.

 

 Accel attached 2.JPG
 Accel attached 1_edited.jpg

Figure 8a - All software components in place

Figure 8b - All software components in place (Side view)

As for the cover to protect all the software components,  the initial design was to use screws at each side, to hold the cover plate down. However, towards the end of the process, the team and I decided to scrap that design as we realized the convenience of using Velcro, and decided to machine a transparent plastic cover plate and attach it to the body with Velcro. This allows users to easily remove and re-attach the cover at their convenience without the requirement of a tool. In addition, the transparent aspect to the cover plate gives the console a ‘modern’ sensation. 

Final 1_edited.jpg

Figure 9a - Final Product

Final 2.JPG

Figure 9b - Final Product (Side View)

Result and Evaluation

The Arduino Controller we designed turned out very well, and its functionality exceeded our expectations. Handling the controller felt very comfortable, it had good aesthetics, and the flexibility of the Velcro allowed for interactive and easy user interaction. The controller was light, and the size was perfect. It did not feel too big or too small. On top of that, it interacted very well with the online Temple Run game and was very responsive to the user’s movement. Illustrated below is a video of the user interaction between the game and the console. I believe we ticked off all the boxes of the criteria allocated for this assignment. I truly enjoyed doing this project, and it allowed me to recognized how I can incorporate the skills I learned from previous assignments into future ones. 

 ​

Instructions to Use Device

Motion Controller for Temple Run - By Michael Sabourin, Josh Dochoda, Tatiana Tabrani, Thy

Operating Instructions:

 

1.  Plug in the controller to your computer, and upload the included arduino code to the device, and check to make sure you are using the correct port.

 

2.  Run the included python code, again verifying that the port python is reading matches the arduino output.

 

3.  Open any internet game or version of temple run that uses the arrow keys for control.

 

4.  Leaning the controller right and left will output a right and left keystroke, will quickly moving the controller up of down and returning to the starting position will output an up or down keystroke.

 

5.  Enjoy!

bottom of page