Week 2 – James

For this week we had a challenge of moving between a black and green line using time, rotations and degrees. The one which was most accurate was the rotations one because we looked at a special rotation measurer on the Mindstorm and found out it was 1273 degrees between the black line and the green line. Next we divided that by 360 because there are 360 degrees in a circle and we got 3.54 rotations.  You can see that in my code below.

My Code for the line distance challenge

After that we looked at the colour sensor. We coded it to stop at the green square on the special line following mat.  But there was one question I asked Richard. Would it stop at a green of any shade? So, we experimented with it and it stopped only once on the line following  mat because it wasn’t the actual green shown on the color picker. We tried again but this time with a green bit of Lego and it stopped all the time at the place it should stop at. So, it appears that it only stops at a certain shade of green.