Ron Burgundy


I don't know how to put this, but I'm kind of a big deal. People know me. Um, I'm very important. I have many leather-bound books, and my apartment smells like rich mahogany. If you can't tell, my name is Ron Burgundy. And I am a robot.

My name is Ravin Shah. I am a Freshman hailing from New Orleans, Louisiana. I am a Computer Engineering & Computer Science Major. This summer was pretty much the best summer ever. I took a trip to Disney World with my cousins and then went on a cruise to the Bahamas. Then I spent most of my days running and swimming. I had a huge birthday party with all my friends and family, which was absolutely incredible. Later, I took another trip to San Antonio, where I visited Six Flags. Finally, I took my one-way flight to LAX and started school at the best place on the planet.

Lab 1: Partners Shane Mileham [Jack Falcon], Brice Roland [Deadbot], Gimin Moon [Aero], and Ravin Shah [Ron Burgundy].
In this lab, we programmed the robot to move and create shapes using the marker. We attempted a square and then a circle. Then we programmed the robot to draw a spiral. Lastly, we played with the music functionality of the robot and had it produce notes of different frequencies.

Here is an image of the robot's drawing.

Next, we tried to test the line sensors and learned that the robot will return only values of 0 or 1. The 0 value meant that the robot was on a dark surface, whereas the 1 value meant that the robot was not touching the ground.

In the next lab, the partners were Diego Von Beck, Yinyi Chen, Alfredo Ramirez, and Ravin Shah. We tested the sensors of all of our robots.
Here were the results:
Name Line Sensors Light Sensors Front IR Sensors Back IR Sensors
Ravin 0, 0 65408, 65356, 65311 6400, 6400, 6400 1, 1
Yinyi 0, 0 65023, 65275, 65141 1280, 1280, 0 0, 0
Diego 0, 0 65394, 65275, 65283 0, 0, 0 0, 0

In the next lab, the partners were Brice, Yinyin, Alex, & Ravin. We were assigned to use the *while*, *if*, and *else* commands. We conceived the idea to turn the robot into a Roomba essentially. The robot would use the front IR sensors to see if there was an object in front of it. If there was an object, the robot would turn and then scan again. If there was no object, the robot would move forward for x seconds and then scan again, etc.

In the next lab, the partners were Brice, Yinyin, Alex, & Ravin again. We were assigned to use the *while*, *if*, and *else* commands along with all of the robot's sensors. We came up with the idea of having the robot scan for obstacles and move forward if there were none. However, if there was an obstacle, it would beep and turn left and then we programmed the robot to stop turning after it sensed 5 obstacles. Then the robot would go into another loop and if it sensed that it was in a bright room, it would repeat a beep 5 times.

In the next lab, we were challenged to have the robot draw the fibonacci sequence on a whiteboard. The partners were Brice, Alex, Gimin, and Me. The sequence uses 1 as a starting number and adds the number to itself to get the next number. (1,1,2,3,5,8,13,21,etc.) We used the value 3.184 as the approximate distance between the center of the robot and the wheel. Then we chose x as a variable [x = (num1 - 3.184)/(num1 + 3.184)] and so we were able to approximate the speed of each wheel to increase by the num1, which was the sum of num1 along with the previous num1. Here is the product:

Homework Assignment 1.

1. Robot will play Clocks by Coldplay using the robot.beep function and will use the beep length and hertz frequency to create the notes. The robot will first sense the battery and then check the light sensor before starting.

2. The robot will then proceed to draw an S using the robot.forward, robot.turnLeft, and robot.turnRight commands. The robot will move at a speed of 1 and the turns will be determined by 45 and 90-degree angles. The robot should sense the middle IR sensor to make sure that nothing is in the way of the robot.

3. Next, the robot will perform a random set of movements using the srand command and setting each function to a different seed number. The robot will only move whilst on a white surface (robot.getLine command) and will also make sure that nothing is in front of the robot using the robot.getObstacle command.

4. The robot will employ while, if, for and else commands to perform its functions. It will also use the battery, light, IR, line, and obstacle sensors to check the different surrounds.

Here is a video of the robot in action.
Watch Video

Here is the code attached in a zip file.
Download Code

In the next lab, the partners were Brice, Alex, and Ravin. The task was the replicate the Braitenberg vehicles along with using user input. The original three functions were Alive, Aggressive & Coward. Each moves differently according to which light sensor is sensing light. Finally, I chose to do the Indecisive function, in which the robot moves forward in light and backwards in shadow. Therefore whenever it hit a shadow line, the robot would become indecisive and constantly move back and forward.

Here is the code attached in a zip file.
Download Code

Homework Assignment 2.

In homework assignment 2, we participated in the official robot games. Each team was assigned to have their robots compete in 4 competitions: Opening Ceremony, Line Following, Maze Solving, & Fastest Drawer. Here are the answers to the pre-lab:

1.The algorithm for the opening ceremony is first to play the USC theme song using the code from and then the robot has to move according to user input. To do this, we created four different functions called "a", "s", "d", & "w" and had each function move the robot in a certain direction.

2. The algorithm for the line following program was actually very simple. We had the robot move forward at all times, except for when the line sensors returned a value of 0. Since the robot was moving backwards, the robot would turn left and right according to when the right and left sensors changed values. Therefore, the robot would always move along the line (it didn't need to scan if it was on the line necessarily).

3. For the maze solving ability, the robot will use the IR sensors to sense its environment. If the front and left sensors sense an object, the robot will turn right. If the front and right sensors sense an object, then the robot will turn left. And if the robot doesn't sense anything, it will continually move forward.

4. For the fastest drawing behavior, the robot will simply follow a set of predefined movement commands to draw the specified object.

5. Many behaviors will use the for and while loops along with if and else functions. The behaviors will be loosely based on behaviors talked about during class.

The other teammates websites are as follows:
Alex -
Richard -
Joey -

Here is the code attached in a zip file.
Download Code

In our next musical lab, we used arrays to create a playlist of songs. The partners were Alex, Brice, and Ravin. We set functions for 5 songs; the Fight Song, Ode To Joy, A Thousand Miles, Coldplay, and All Of The Lights. After initializing the array, we created a for loop for user input to set which songs to play. The program also allows the user to select how many songs to play. Here is the code for the lab: Download Code

HOMEWORK 3: Urban Search And Rescue
1. Our strategy will be to work in 4 separate locations to attempt to map the course in sections and then piece them all together. The program will consist of separate functions to move around, take pictures, place the pictures in arrays, and finally edit the photos. There really aren’t many sensors needed except maybe the obstacle sensor, battery sensor, and of course camera.
2. Basically the robot will use the a,s,w,d keys to navigate and around. It will then use the camera to send feedback to the computer telling the user where to go next. The program will be simple and have the robot move in a direction, take a picture, and return it to the user. A while loop will be used.
3. It will drive around taking pictures. The user will then identify the locations of lost scribblers and take note of the location on the map.
4. The mapping strategy should be to work in separate parts of the map to avoid wasting precious time. Then we will compile the 4 separate locations of the area onto the map.
The team members are Ravin, Parker, Skylar, and Brendon.

Here is the attached code: Download Code

The HW4's prelab is as follows:

1. Basically the search algorithm will search the picture and determine if there are any aliens in the picture. If there are, then it will use a function to begin scanning the image vertically until it finds an alien picture (using RGB values that range from different green values). Then it will store the alien pixel into an initial x position value in the alien object. Next another function will do the same process but scan horizontally. After finding and storing all the alien pixels, the function will continue to scan the image for other aliens, etc.
2. The class alien is comprised of setters and getters for the initial x and y, final x and y, height, width, and area.
3. The algorithm works by defining the alien based on a threshold value of colors. For example, once the program finds a pixel that fits within the threshold it will scan the rest of the picture. However, once the program figures out that it is not within the threshold anymore it will end the object.
4. The easiest way to start was to create the algorithm to find only one alien. Then add one more alien to see if it still worked. It continued doing this until I was certain the program could find multiple aliens.
5. I ended up using a selection sort to sort the aliens by size. It works as selection sort does by simply going through and swapping the first value with the lowest value remaining in the set. Therefore it will create a separate sorted list and remaining unsorted list. It may not be as memory efficient as bubble sort, but it works just as well.
6. The location sorting function works by getting the minimum x location in the temporary array. If the temp array is less than the x location it will set the x location equal to the min x location and then continue that method. It will then be able to sort the aliens by location.
7. The Big O for the program is O(n2).

The final project's prelab answers are as follows:

1. The topic that we are trying to teach is algorithms. The basic idea is that algorithms are in everyday life and we use them all the time. The program itself is the simplest of algorithms to have the user guess a randomized number that the computer has generated. The computer will either say that a guess is too high or too low to help the user find the answer.
2. The program will engage the user by creating an easy guessing game, which is actually quite fun for children.
3. I started by thinking of what the easiest way to teach algorithms. The idea developed from a game that I would always play with my little brother when he was in elementary school.
4. I will evaluate the human-computer interface by how the children are able to play the game. If they can complete the game within a certain number of tries then it will reflect the fact that they understood the interface.
5. I will engage the user’s interaction by seeing how many times the children play the game. Also they can play multiple times which will reflect in the evaluation.
6. The program will ask the user for his/her name. Then the program will randomize a number and have the user guess the value. The program will keep track of how many times the user guesses and record this number. Also the user only has 15 tries to guess the correct answer and if they are not able to, they will have to try again.
7. The program automatically generates the evaluation and includes things such as name, number of tries, and if the user finished the program. All these are simple vectors that are outputted to the output file.

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