Week 2 – Brayden

This week  during robotics class we started basic programming of the  Mindstorm robot. We completed a challenge where we had to programme the robot to move straight to a green line and back to a black line. When we first attempted this we programmed the robot to move forward for 1.75 seconds at full speed, and then back at the same speed and for the same length of time. We then tried the task again, but this time we had to work out the amount of degrees the wheels had to turn to reach the green line, and then get back to the start. We did this by using the motors. For the final part of the challenge we had to work out how rotations of the wheels would it take to reach the green line and then back again. We did this by dividing the amount of degrees this would take by the amount of degrees in a circle (360) to get our answer of 3.536111… rotations. We then programmed this to make the robot go to the line and back. Here is my programme:

My Code

After this fun challenge we began using the colour sensor to make the Mindstorm stop when it ran onto the colour green. We experimented with this by using different shades of green. To start with we tested this on a printed shade of green on the line follower track. We used a Lego piece to see if it would work better, after we found out that it only worked one time on the printed shade of green. The piece of Lego we used worked indefinitely better as it worked every time. It was interesting because we tried to create a shadow over the green on the track so it would appear to be a darker colour. In the end this had no effect on the results.

During next week’s session we are going to explore the abilities of the colour sensor to a further degree.