Name: Kelly Yokoi
Period: 7
Assignment: Lab #8
Solution Pt. 1a
To make the finch move forward we first defined what that was by creating a block. We used the Move Fuinch block to input how fast we wanted the wheels to rotate. Then we had to put a Wait block to control how long it will move forward. We ended it with another Move Finch block with values set to zero so the robot would stop.For the moveBackwards block we did the same exact thing except the first Move Finch block had negative values.
To make the finch turn left we defined a block. We used the Move Finch block and had the Left wheel move at an positive integer and then we had the Right wheel move at the opposite negative integer. We then put a wait block so the finch would move a certain number of degrees and finally ended it with another Move Finch block with the speeds set to zero. To make the finch turn right we did the exact same thing except switched the values of the first Move Finch block so that the Left wheel was negative and the right wheel was positive.
To make the finch notice an obstacle we created a variable called block and used the Finch left/right obstacle command. We then used booleans. If the Finch left obstacle was equal to blocked then the sprite on the screen would say it.
Solution Pt. 1b
To make the Finch move in a square and light up we had it move forward using our definition before, shine the light using the Finch LED color command and turn right using our definition from before 4 times.
]For the orientation problem we just used the if then commands set equal to Beak_Down, In_Between etc. then had the sprite on the screen tell us what the orientation was.
For the finch to move backwards when it detected an obstacle we used the Finch left/right obstacle command and said that if that is blocked then the finch will move backwards (using the previously defined block) and turn (using another previously defined block).
To make the finch move in a figure 8 we had the finch move forward, then move a certain degrees left, move forward, then move a certain degrees right.
Solution Pt. 2
For this part we created 5 sprites. One would ask what numbers the user wants to add, subtract, multiply, or divide; the others would do the operations.We defined the different operations using number1 and number2 and have that say the specific operation of the 2 variables. Then had it so when the sprite is clicked it would do the defined operation.
Click HERE to return to homepage.