Loopy is the best robot ever. She moves fast as lightning, and she can draw pretty stars!
Hi, I'm Jessica. I am in Computer Science (Games) because I think CS is a very useful and widely applicable skill, and I very much enjoy design and digital art.
I love projects and making things, and I can be kind of a perfectionist. I hope to discover new interests during my studies here at USC!
Our work of art:
Today we tested our Line sensors. 0 is for light surfaces, and 1 is for dark!
1. Loopy first sings a part of the chorus to "A Beautiful World," which is triggered by the getBattery sensor when the battery level is at least 6.5. Next she sings the beginning of Beethoven's 5th Symphony when triggered by the getObstacle sensor after encountering an obstacle.
2. Loopy draws continuous loops, triggered by the getLine sensor while she is on a light surface (0).
3. Loopy's surprise ability is being able to randomly draw a circle, square, or triangle!
4. Loopy is triggered by multiple sensors (getLine, getBattery, getObstacle) during her performance. First she draws her loops until she senses the dark surface. After singing a song because her battery level is high, she moves forward until she is faced with an obstacle. She sings ominously at the obstacle before firing beeps! Lastly, Loopy shows off her spontaneity when she goes back to the whiteboard to draw a random one of three shapes.
1. Opening Ceremony: I put the user input algorithm in a while loop, which continues until the battery falls below 6.5 as sensed by the getBattery sensor. The program asks for the user to input a number 1-5, and for each command the user can input the same number again to stop the command (e.g. enter 1 to turn left, enter 1 again to stop turning). The Fight Song plays when the user inputs 4.
2. Line Following: Lizhi uses the getLine sensor. She makes it so that when both getLine sensors are displaying 1, the robot will go forward. If the right sensor senses a light surface, then the robot will turn left, and vice versa.
3. Maze Solving: N/A (ommitted because we are a two-person group)
4. Fastest Drawer: I use the commands robot.forward, robot.turnLeft and robot.turnRight to make the drawing. I use full speed (1) for robot.forward, but I use half speed (0.5) for the turns so that the drawing stays accurate.
5. Structuring the behaviors: We create a function for each behavior, and user input determines which behavior to perform (1 for Opening Ceremony, 2 for Line Following, 3 for Fastest Drawer).