top of page

Moving in the Right Detection ( using a gyroscope)

The last two weeks have been a lot more difficult because the sensors we are using require the environment around it to input the directions and therefore arent as consistent and direct commands to the motors or light sensors. The two troublesome sensors are the proximity sensor and the gyroscope.

We had used the proximity sensor before in a simple program of stopping before it hit a wall (which had no side walls). However in this challenge the students had to go through a maze. The problems was that the sensors would trigger prematurely and the robots would turn and run into a wall. The students programming was done correctly however we could not get repeatable results, because of this I marked students on either being able to show that it working once or if I looked at their code and it looked good

The other sensor that was giving us a bit of grief is the gyro sensor. The gyroscope is the sensor that is in charge of keeping track of the degree of rotational movement. The problem was that when we wrote down the angle of the turn it would always overshoot it but not consistently enough to account for it in the code. Eventually we realized that the slower you turn the more accurate it becomes. So now if the students are turning 90 degrees they will turn the first 75 degrees at half speed and then slow down to quarter speed for the last 15 degrees.

The last sensor that we will learn before we get in depth about flow commands is the color sensor. The sensor can distinguish basic colors and allows the robot to know what is in front of it based on the color.

Once we finish with the color sensor we will move on to the flow commands which include "repeat", "while", "if" and such commands.

bottom of page