Welcome to the Homepage of Olivia Hogan & Turtle the Robot

Here is a picture of Turtle, my robot, who's really cute. He is pretty slow, and can play music but isn't good at it.
My name is Olivia Hogan. I like programming. In the summer I visited family in Japan.
My hobbies are watching Hawaii five-0 and sewing.

Lab 1

Today we made our robots draw shapes with basic commands like "robot.forward (1,1)." I made Turtle move forward and draw a line.

Today we did a light sensing lab with our robots. I made code to make Turtle say his battery level, what type of surface he's on (dark or light,) and his distance from obstacles. Here are the results of my team and their robots, Speed Racer, Spotz, and Bot of Steel.

Robot Placed on solid surface Held in the air Obstacle on left Obstacle in center Obstacle on right Dark surrounding area Light surrounding area Battery level
Bot of Steel 1,1 0,0 0,0,640 6400,6400,6400 0,0,0 66201 65047 7.33987
Speed Racer 1,1 0,0 0,0,640 6400,6400,6400 6400,3049,2345 65404 64890 7.19688
Turtle 1,1 0,0 5120,5120,4480 2560,3840,1280 5760,5120,5120 65113 65036 7.24455
Spotz 1,1 0,0 4480,5760,5760 1920,1280,0 6400,6400,6400 65281 65110 7.48285

Lab 2

We turned in a program with If, While, and For statements that uses all of our robot's sensors.

Today we finished our Fibonacci sequence program (A picture of the code will be uploaded soon.)

Turtle's Talent Show

1) Turtle will sing the Christmas carols Rudolph the Red Nosed Reindeer and Frosty the Snowman. Turtle uses the robot.beep command to sing. Turtle's battery sensor will use if and while statements to check if he has the energy to perfom.
2) Turtle will draw a star or a square. Turtle uses various robot.turnRight and robot.forward commands. Using his obstacle sensor, if there are obstacles around him he will draw a star, and if there are no obstacles around him he will draw a square.
3) Turtle's surprise ability is random spinning and beeping. Turtle uses the rand() command and various if and for statements, along with his IR and light sensors to determine how to perform his surprise.
4) The structure of Turtle's performance depends on his environment; his performance will change according the the room's light, the surface, its surroundings, and random chance.

See Turtle's Show on Youtube

Turtle's performance code
Click here to download the .cpp file for Turtle's performance.

Braitenberg Vehicles
We made the algorithms for the Braitenberg vehicles.
Group: Cherys, Taylor, and Mathew.
We each did the first 3 behaviors (Alive, Coward and Aggressive), then I did Indecisive.
Alive - The robot moves when there is light, speeding up when there is more.
Coward - The robot moves away from the light.
Aggressive - The robot moves towards the light.
Indecisive - Moves forward constantly when there is light, and when the light sensors sense darkness, the robot starts going backwards. So, it goes back and forth at the edges of shadows.
Here is the code.
Robot Games Assignment
Group: Albert, David, and Eric.
We worked on the robot games assignment. I did the opening ceremony portion.
1. For the opening ceremony, use if statement and user input (cin>>) to set a, s, d, w keys as left turn, backwards, right turn, and forward directions respectively.
Here is the completed code.

USAR Homework 3

Mathew Schacher, Akriti, and Oceane Bel.


1. For my team's USAR strategy is to navigate, locate the lost scribblers, and map their locations.
Each of us will navigate through one section of the room to look for the lost scribblers, while using the Obstacle, IR, Light, and Battery sensors.
We will take pictures with the robot camera to compile a map of the lost scribbler locations.

2. To navigate through the mock disaster area, my robot will use boolean functions and if and else statements.
Within these functions and statements, the program will ask for user input, which can control the robot.
It will use the obstacle sensor to sense if there is an obstacle in the way, and tell the user such information.
It will also use the battery sensor to test if it has enough battery in the beginning.

3. To locate the lost scribblers, my robot will use its camera to take a picture of the lost scribblers.
Then, I will create a function for my robot to use input parameters as coordinates, and place a box around the scribblers in the picture.
It will use a pointer to the picture object as well.

4. To map the lost scribblers, my team will combine our pictures of the scribblers in our sections and put them together to create a map.

MARS Homework 4


1. The search algorithm for finding the aliens is to use looping to go through every pixel and identify the areas that are green. Then, the program will record data about the aliens found, and then it will sort the aliens by size and by closeness.

2. The class Alien will have data members and member functions like void AlienSearch(), alienFound, picturePic, and more. These functions will find and store data about the alienís size, closeness, and etc.

3. To develop the object recognition algorithm, I will use a searching algorithm that finds the aliens by looping through every pixel and identifying the areas that are green. Then, in the AlienSearch function I will use boolean logic to record data if an alien is found and not if otherwise.

4. I choose MARS1.jpg because there is only one alien shown in the picture. Thus, it will be easier in the beginning to test if my algorithm is identifying any green pixels at all. After knowing so, I can then test my algorithm on the pictures with more aliens to see if it is identifying location and size properly.

5. My sorting algorithm for the aliens by size will identify how many green pixels make up the alien, and then factor that into the program.

6. My sorting algorithm for the aliens by closeness will measure the distance from the alien identified to the rover, and then factor that into the program.

7. The Big O of my sorting algorithms is n^2. That the searching algorithm will take relatively more time. It will have to search through every pixel in the x and y axis directions to determine what is green and then convert it. The sorting algorithms will take up a little less time.

Final Project


1) The CS topic that my group is trying to demonstrate is the topic of objects. To accomplish this, each of the members will create their own individual game using classes and objects. For instance, I will make a game based on the spinner on a game board. To simulate a spinner landing on one of 4 sections, I will create a class called Spinner with different private and public functions and variables. Depending on which section it lands on, the playerís coin count is increased or decreased.

2) My program will engage the user because the user gets to input 1 to simulate spinning the spinner, or 2 to exit the game. The user gets to spin as many times as possible until their coin count reaches 20, and then they win. The program also keeps track of how many turns the player took to reach 20. That way, although the game is single player, players can compare their turn count to see who finished the game faster.

3) My process for developing the human-computer interface is to use classes and objects to create my game. I will use various functions and variables to simulate a spinner game for the users to play.

4) My way of evaluating my human-computer interface is to see how the users are reacting in general to the game. In addition, I can use a survey at the end of the program with ifstream and ofstream to see if they liked it or not.

5) I will evaluate the userís interaction using a survey at the end of the program. The survey will ask the player whether they enjoyed the game or not, and not appear to be a survey, to avoid taking the fun out of the game. Also, I will evaluate the userís interaction in general by watching whether they are happy playing it or not.

6) My program will ask for user interaction to spin the spinner. Every time the spinner is spun, the program will remember how many times it has spun and print which time it is before every turn. Also, the program will keep track of the playerís score as they spin, until they reach or go beyond 20 coins.

7) I will use ifstream and ofstream code to ask the player for input on whether they liked the game or not. Then, the userís input will be stored in the ifstream. Afterwards, the data collected from each player can be looked at through the ofstream.

Valid XHTML 1.0 Transitional!Valid CSS!