Week 3 – Brayden

This week during robotics class we began learning about pseudocode. To start with we discussed what pseudocode is. Pseudocode is detailed notes that are not in a specific language that a programmer can use to communicate their plan with others and review later to write their code. To learn this we looked at an example of students trying to write instructions to make a peanut butter & jelly sandwich which was then given to their teacher to follow. The 3 students who wrote the instructions did not write them very clearly which caused their teacher to fail at making a PB&J sandwich. After we looked at this example we moved on to attempting a challenge. For this challenge we had to make a robot go around in a square.

This is the pseudocode for the challenge:
Step 1: Move forward 4 wheel rotations
Step 2: Turn left 90 degrees
Step 3: Repeat steps 1 and 2 three more times

This may seem like an easy task but it was very difficult to get the correct amount of degrees to turn. After many attempts we decided to use port view to find the correct amount of degrees to turn. This is my loop of code that I used to complete the challenge:

We were then shown some pseudocode which we had to use to work out what the proper code would do.