THE SENSORS

For the past 2 weeks we have bean learning how to program a Lego robot called a EV3. The EV3 robot can avoid objects, follow a line or escape a maze using sensors. There areĀ  different types of sensors like the touch sensor [which can tell if it bumps something], The colour sensor [a sensor that can tell what colour something is and make the robot stop once it reaches that colour] and the ultra sonic sensor [the ultra sonic sensor can tell how close it is to a object and make the robot stop if it is going to crash].

ME AND SASKIA’S PROGRAMS

Using these sensors, my partner Saskia and I have been able to create many programs, not all of the programs have worked.

PROGRAMS THAT HAVE WORKED

COLOUR RACE

Colour race is the first program that Saskia and I made that uses the colour sensor. This is the code for colour race.

The first brick in the code is a start brick. Putting this brick at the start of your code means that the brick that comes after it will be used at the start of your program. In this code the brick that comes after the start brick is a move brick, this block can move any two motors. In this code the two motors that move are the motors plugged into ports B and C [the wheel motors]. We have set the move brick to on mode so the motors will keep on going until something signals that it needs to stop this is what the third block is for. The third brick is a wait brick set to the mode colour sensor, white, this means that the EV3 robot will wait until the colour sensor sees the colour white before continuing the code. The last brick in the code is another move brick but instead of setting this brick to on mode Saskia and I have set it to off mode this means that the motors B and C will stop.

OTHER PROGRAMS THAT WORK

  • Start-Stop
  • baceball challenge part one
  • face change
  • square

PROGRAMS THAT DON’T WORK YET

  • maze
  • triangle