Hello. My name is Eamon Barkhordarian of Computer Science (games)

I enjoy computer science because I enjoying building an creating things from scratch. Last summer, I rented a beachhouse with some of my closest friend for a few days. It was a very memorable experience. Some of my hobbies are rapping and producing music, making Youtube videos, working out, and playing basketball. I am passionate about creating a fun but balanced life.

My group consists of Gabriel "Badass" Mel (robot name dharmabot), Anjali Ahuja (Sally), and Greg Grabarek (Chuck).

look at how obedient my robot is!

This is my Robot. My robot's Name is S.N (which stands for Supernatural) and is a very obedient robot that listens to my every command

look at how obedient my robot is!

Lab 1

My partners were Greg Grabarek (Chuck), Anjali Ahuja (Sally), and Shane (Jack Falcon)

Sensor Data:

Shane Mileham (Jack Falcon)

Hello, I’m Jack Falcon
Connected to Robot
getLine()[0]: 0
getLine()[1]: 1
getIR()[0]: 0
getIR()[1]: 1
getObstacle(‘left’): 3200
getObstacle(‘center’): 4480
getObstacle(‘right’): 4480
getLight(0): 64902
getLight(1): 65275
getLight(2): 65281
getBattery():7.19688

Eamon Barkhordarian (S.N)

Hello, I’m .1.2,Robler2,Mod
Connected to Robot
getLine()[0]: 1
getLine()[1]: 1
getIR()[0]: 1
getIR()[1]: 1
getObstacle(‘left’): 6400
getObstacle(‘center’): 6400
getObstacle(‘right’): 6400
getLight(0): 64981
getLight(1): 64934
getLight(2): 65144
getBattery():7.10156

Greg Grabarek (DharmaBot)

Hello, I’m Scribby
Connected to Robot
getLine()[0]: 1
getLine()[1]: 0
getIR()[0]: 1
getIR()[1]: 1
getObstacle(‘left’): 0
getObstacle(‘center’): 0
getObstacle(‘right’): 0
getLight(0): 65006
getLight(1): 64614
getLight(2): 64625
getBattery():7.24455

Anjali Ahuja (Sally)

Hello, I’m Scribby
Connected to Robot
getLine()[0]: 0
getLine()[1]: 0
getIR()[0]: 1
getIR()[1]: 1
getObstacle(‘left’): 0
getObstacle(‘center’): 0
getObstacle(‘right’): 0
getLight(0): 64896
getLight(1): 65282
getLight(2): 64514
getBattery():7.24455

My group managed to complete some "if, else" statements regarding battery life. If the battery was above a 7, it would reply with "SUPER CHARGED", otherwise it would respond with "notreallycharged"

Here is the Fibonacci drawing by my group's robot

HOMEWORK 1 PRELAB

1. My robot will be singing the melody of the popular song “Whistle” by Flo Rida. I looked up the piano sheet music for “Whistle” on the internet. Due to my music knowledge from playing piano, I was able to read the music notes of the sheet music and write the different notes in Notepad ++. Then I found a music hertz converter telling me the hertz of specific notes. I then inputted the specific hertz of each note of the song into myrotest.cpp and manipulated the second duration of each note by their tempo in the sheet music. I used the following algorithm:

robot.beep(seconds, hertz);

2. My robot will be drawing an hourglass symbolizing the lengthy amount of time it took to make this project.

I used the forward and turn functions to make the hourglass and calculated the amount of turn by calculating that a 90 degree turn was equal to .75 on my robot and I worked from there.

turnLeft(speed, seconds)

3.My robot’s surprise ability is to move forward and backward on a white surface. I use a rand function choosing between 0 and 1. If a 0 turned up, the robot moves forward, and if a 1 turns up, the robot moves backwards. I use a line sensor that only allows the robot to move forward and backward on a white bright ground using the “while function”. The minute you place the robot on a dark surface, it stops moving.

4. I have a list of all the rest of the sensors that simply provide current values for all the sensors.

Here is my robot performing on the talent show!

http://www.youtube.com/watch?v=qM6yLIyc-eI

Click here to download and view the code to my Robot Talent Show

cout << "getBattery():";

cout << robot.getBattery() << endl;

cout << "getLine()[0]: ";

cout << robot.getLine()[0] << endl;

cout << "getLine()[1]: ";

cout << robot.getLine()[1] << endl;

cout << "getIR()[0]: ";

cout << robot.getIR()[0] << endl;

cout << "getIR()[1]: ";

cout << robot.getIR()[1] << endl;

cout << "getObstacle('left'): ";

cout << robot.getObstacle("left") << endl;

cout << "getObstacle('center'): ";

cout << robot.getObstacle("center") << endl;

cout << "getObstacle('right'): ";

cout << robot.getObstacle("right") << endl;

cout << "getLight(0): ";

cout << robot.getLight(0) << endl;

cout << "getLight(1): ";

cout << robot.getLight(1) << endl;

cout << "getLight(2): ";

cout << robot.getLight(2) << endl;

Click here to download and view the Alive Coward Aggressive Code

As a team, Mel, Angeli, Greg, and I together created the Alive, Aggressive, and Coward functions.

I was assigned the task of creating the paranoid function.

Click on the link aboce to view the code!

here are my group members' websites:

Gabe: http://www-scf.usc.edu/~meldefon

Angeli:http://www-scf.usc.edu/~ahujaa

Greg: http://www-scf.usc.edu/~ggrabare

HOMEWORK 2 PRELAB

1. The code for the robot’s Opening Ceremony was created by group member Eamon. It begins with a void function for the fight on song. The tempo is a flexible number that can be manipulated in the terminal. The fight song uses robot.beep(second,hertz). The user is allowed to input a character and a double for the movement of the robot. WASD are the keys for movement and any number following that signifies the duration of that movement in seconds. “cin” is used to allow the user to input characters and doubles and a series of “if” statements using “robot.turnRight/left” and “robot.forward/backward” for the movement.

2. Greg did the "Line Following" part of the robot Olympics. To do this, he defined four variables, cruise, turn, left, and right. Left is equal to the value from the left Line sensor, and right is equal to the value from the right Line sensor. The robot is oriented backwards so left and right for motors and sensors are flipped. Cruise is used to set a speed for the robot to move forwards and backwards while turn sets the speed for the turning robot. The program then uses four while loops to decide how to follow the line. If both left and right sensors detect a line, the robot moves forward. If the left sensor stops detecting a line, the robot turns right. If the right sensor stops detecting a line, the robot turns left. I use a wait function because this allows the robot to better follow the turns. If both sensors stop detecting a line, the robot will move backwards. The program also outputs the Line sensor values and tells the user what it is doing to make the program more user friendly.

3. The maze solving portion of the performance was created by Gabe and uses only the obstacle sensor. The robot will continue forward until the obstacle sensor reports an obstacle in the front. When this happens, the robot will turn 90 degrees to the left and take another obstacle reading. If this reading indicates that there is still an obstacle in front of the robot, it will then turn 180 degrees, or what would have been a right turn from the first obstacle sighting. Then, because we’ve been told that the mazes will only include 90 degree left and right turns, the robot will find a clear path either to the right or left, and continue forward in that direction. This continues until the robot has found its way through the maze. The maze traversal could be made considerably faster if one could take advantage of the left and right obstacle sensors, choosing the clear direction first, but unfortunately, the sensors do not provide valuable information (they are not really left and right sensitive, as one might expect them to be). Therefore, the simple rule of always turning left first has been used.

4. Anjali did the “Fastest drawing” part of the robot Olympics. To do this, she created 2 functions, T and R, standing for travel and rotation. These functions were created by measuring the number of inches traveled in one second and the number of degrees rotated in one second. It then compiled this information into an equation that allowed to enter parameters for inches and degrees, incorporating the robot.forward commands and the robot.turnRight commands. The robot can draw the sierpinski triangles without overlapping any lines and without having a user pick up a pen out of the robot at any time. The entire function was then placed in a new function called “Draw,” which can be triggered by user input. This part of the program does not start unless the battery level is above 6.0, thus incorporating an if/else loop.

5. The performance will be structured with a main menu allowing the user to decide on a behavior by entering a certain number. This will be accomplished by using a while loop that constantly takes input, and using if statements, executes the correct behavior. There will also be an option to stop performance and disconnect from the robot.

USAR Prelab Answers

1. Every picture uses all the robot sensors to give a more detailed description of the area the robot is in. Since we cannot see the robot as it is in the disaster area, we have to remotely navigate the robot. We take a picture every 10 seconds of movement to keep track of our position in the disaster and adjust accordingly. I save every picture I see a scribbler in into an array to later edit and place a green box around.

2. We use the WASD character inputs from the keyboard to move the robot right, left, forward, and back. We press a number to indicate the duration of the robot’s movement. We also indicated the letter “p” to signal the robot.takePicture() function. The rectangle function calculates the height and width of the green box around the scribbler. I also use a reference variable in my search function referencing the number of pictures with scribblers I want to save.

3. We take pictures by pressing the “p” character in the search function. By understanding where we are in the disaster course, we can then navigate toward scribblers to take pictures. I explain more of this strategy in the above questions.

4. We work backwards for mapping the scribblers. After the 10 minutes pass, we scroll up in the terminal to see all our previous movement inputs to the robot and then see how far we travelled to locate and take a picture of each scribbler.

Homework 4 Prelab Answers

1. Every picture uses all the robot sensors to give a more detailed description of the area the robot is in. Since we cannot see the robot as it is in the disaster area, we have to remotely navigate the robot. We take a picture every 10 seconds of movement to keep track of our position in the disaster and adjust accordingly. I save every picture I see a scribbler in into an array to later edit and place a green box around.

2. We use the WASD character inputs from the keyboard to move the robot right, left, forward, and back. We press a number to indicate the duration of the robot’s movement. We also indicated the letter “p” to signal the robot.takePicture() function. The rectangle function calculates the height and width of the green box around the scribbler. I also use a reference variable in my search function referencing the number of pictures with scribblers I want to save.

3. We take pictures by pressing the “p” character in the search function. By understanding where we are in the disaster course, we can then navigate toward scribblers to take pictures. I explain more of this strategy in the above questions.

4. We work backwards for mapping the scribblers. After the 10 minutes pass, we scroll up in the terminal to see all our previous movement inputs to the robot and then see how far we travelled to locate and take a picture of each scribbler.

Valid XHTML 1.0 Transitional!Valid CSS!

The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees
The University of Southern California does not screen or control the content on this website and thus does not guarantee the accuracy, integrity, or quality of such content. All content on this website is provided by and is the sole responsibility of the person from which such content originated, and such content does not necessarily reflect the opinions of the University administration or the Board of Trustees