Sensors

Sensors in EV3 are very important because they help the robot "see" and "feel" its surroundings in order for EV3 to make smart decisions based on what it senses.

There are 5 type of sensors:

Ev3 Brick

ev3 brick

The EV3 brick is the "brain" of the LEGO Mindstorms EV3 robotics kit. It's like the control center or computer for your robot.

It's where you connect all the motors, sensors, and other components.

You can "start the program"(center button) or exit the program (cancel button).

Brick-img

-> The Brick buttons: are also Touch sensor buttons.

-> The 5 buttons on the front of the EV3 (not counting the Cancel button) can be used as Touch Sensors!

Ev3 Brick is not like the other sensors. But...

You can see how the other motors and sensors are:

ev3-brick-view ev3-brick-view2

-> Press the brick and you will see which motor/sensor is plug in to which input (A-D for motors or 1-4 for sensors)

Wait until "Center button pressed"

Center-3ve-pressed
1BrickSensor center

1- Move until "center button of brick it's pressed"

2- Robot stop moving


Notice that this is anotehr robot, so don't worry if the robot moves differently.

1-brick-center-wait-Until

1- Wait [Motors start moves forward] UNTIL ["center" button of brick it's pressed].

2- Stop moving.


Wait until "Center and Up button pressed"

Center-3ve-pressed Up-3ve-pressed
brick

1- Robot "start moving" UNTIL "center" button is pressed.

2- Robot "Stop moving" UNTIL "Up" button is pressed.

2-brick-center-Up

1- Wait [Motors don't move] UNTIL ["center" button of brick it's pressed] robot starts to move forward forever.

2- Wait [ starts to move forward forever] UNTIL ["UP" button of brick it's pressed].

3- Stop moving.


Wait until "Right button pressed"

Right-3ve-pressed
brick (2)

1- Start moving Until "right button of brick it's pressed"

2- Robot make a spin turn and stop moving

3-brick-right-wait-Until

1- Wait [Motors starts moving backward at the speed of 50%] UNTIL ["right" button of brick it's pressed].

2- Robot make a spin turn of 400 degrees at the speed of 50%.

3- Stop moving.


Key-Takeaways: Why is ev3 brick sensor important for programming?

Time for a quiz!

Question goes here

Challenge for you

brick (3)

This video/gif it's speed up x2.

Hint:

-> Press the brick 3 times

1- "down" button. move backward for 300 degrees.

2- "up" button. move forward for 600 degrees

3- "center" button. motor moves 150 degrees

All of the speed is 50%

Notice that the pressing the brick go in order

BRICK-CHALLENGE-YOU

Notice that: "Wait until" go in order. You can't skip.