Brayden – Week 11

This week in robotics class we decided to put two colour sensors on the Mindstorm. We decided to do this so that we could detect the green squares (hints) and use them to turn in the correct direction. To start the lesson we watched a video on YouTube to show us a piece of code that we could use to programme the Mindstorm. After writing this piece of code we then tried it out on the course. No ones worked due to the fact that the turning speed was far too low. Before we amended our speeds we decided to use variables (red blocks) to make it easier when we are changing our speed in our code. We tried this again and it worked. After revising our code so that it worked we decide to start ‘tuning’ our code. This meant we started trying various speeds and turning speeds so that we could have the fastest working robot. While we were tuning our speeds we agreed to move the two colour sensors closer together to see what difference doing that would make. It had a huge impact on the success of the Mindstorm. Causing it to lose the line at some speeds and perfecting other speeds. Here is my piece of code:

My code to use with two colour sensors

We will continue to tune and improve the performance and success of the Mindstorm by using the two sensors. Although we did not get to programming the Mindstorm to detect the hints, next week we will use the colour sensors to detect the green hints and turn in the direction of that specific hint.