LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware •...

47
LEGO EV3 CHEAT SHEET

Transcript of LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware •...

Page 1: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

LEGO EV3CHEAT SHEET

Page 2: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

• Without a program, a robot is just a statue. It may be a cool statue, but it’s still a statue.

• When you program a robot you give it abilities— to move, to follow lines, to avoid objects, to make mathematical calculations, and much more.

• The EV3 Software has an intuitive, graphics-based format that users from 10 to 100 years of age can quickly learn and successfully use.

Page 3: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Programming palettes• All the programming blocks that are used for

controlling your robot are located in Programming Palettes at the bottom of the Programming environment underneath the Programming Canvas.

• The Programming blocks are divided into categories according to type and nature, making it easy to find the block you need.

Page 4: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Action blocks

Medium motor

Large motor

Move steering

Move tank

Display

Sound

Brick status light

Page 5: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Flow blocks

Start

WaitLoop

Switch

Loop interrupt

Page 6: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Sensor blocksBrick buttons

Colour sensor

Gyro sensor

Infrared sensor

Motor rotation

Temperature sensor

Timer

Touch sensor

Ultrasonic sensor

Energy meter

NXT sound sensor

Page 7: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

My Blocks• When you are repeatedly

using the same segment of a program in many programs, its a good time to create a ‘My Block’.

• Once your My Block is created, you can simply insert that single block into future programs within the same project.

Page 8: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Firmware• Firmware is the software that is inside the EV3 Brick.

Without its firmware, the EV3 Brick will not work.

• Occasionally, the LEGO Group may release new versions of the firmware that add enhanced functions or fix software bugs.

• To update the firmware, you need a USB connection from your computer to your EV3 Brick. Your computer must also be connected to the Internet.

• You might need to take the brick home to update it.

Page 9: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Resetting the EV3 brick• If your EV3 Brick suddenly stops working and cannot be shut

down through the normal process, you will need to reset your EV3 Brick.

• Resetting the EV3 Brick does not delete existing files and projects from previous sessions in the EV3 Brick memory. Files and projects from the existing session will be lost.

• 1. Make sure that the EV3 Brick is turned on.

• 2. Hold down the Back, Centre, and Left buttons on the EV3 Brick.

• 3. When the screen goes blank, release the Back button.

• 4. When the screen says “Starting”, release the Centre and Left buttons.

Page 10: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Flowcharting• All robots need to have programs to make them run.

• The easiest way to start a program is to first have a plan. This plan consists of a flowchart of small steps that make up the entire program.

• Each step is simple enough that the robot can perform it without too much effort.

• Task: Using the blank flowchart below, plan out your daily morning routine, from when you wake up until you get to school.

Page 11: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 12: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

A closer look…

Page 13: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

To stop!Keep pressing “1” until it appears on

the screen!Then press “2” to select off option

Page 14: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 15: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

EV3 Ultrasonic Sensor• Detects distance

• Accurate to 1 cm or 0.3 inches

• Can listen for other ultrasonic sensors

• Improved design for easier build solutions

• Eyes light up to identify which mode the sensor is operating in

Page 16: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

EV3 Colour Sensor• Detects eight different colors

• Detects ambient light, from dark to sunlight

• Detects reflective red light

• Built-in cancelling of backlight makes sensor more reliable

• Improved design for easier build solutions

Page 17: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

EV3 Touch Sensor• Detects pressed

• Detects released

• Detects bumped

• Improved design for easier build solutions

Page 18: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

EV3 Gyro Sensor• Angle mode

• Gyro Sensor mode

• Angle and Gyro Sensor modes

• Can reset accumulated angle value

• Improved design for easier build solutions

Page 19: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

EV3 Navigation

Page 20: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 21: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Programming

Page 22: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Programming Environment

Page 23: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

The Communication Pane• Connection status

• Download programs ready to be run

• Download/play programs instantly

• Download a section of a program to run

• Intelligent EV3 Brick status: name and battery level, etc.

• Port status and sensor readings

• Type of connection between the EV3 Brick and the computer (BT, Wi-Fi, or USB)

Page 24: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 25: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 26: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 27: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Controlling the EV3 Motors• Instructing the robot to move and turn is accomplished by

the Large Motors which rotate in a predetermined direction where positive amount of power (e.g. 75), will cause a clockwise rotation and negative power (e.g., -45) will cause a counter-clockwise rotation.

!

!

!

• NOTE: the same concept applies the medium motor.

• All examples used in this document assume the robot configuration & motor is mounted as shown.

Page 28: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 29: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 30: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 31: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 32: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Steps to create a program

Page 33: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Turn vs. Spin• There are two ways in which you can make the robot turn

Make ONLY one motor move, or Using both motors moving in opposite direction, and this is referred to as “spinning"

• One Motor move: Right Turn – Use MOVE TANK block and select a power level for the “B” motor and zero for the "C" motor

• In this case the robot’s right wheel will be stationary and the left wheel will move.

• Turning with two motors in opposite direction To turn right, use the MOVE TANK block where the “B” motor will turn clockwise (positive power) and the “C” motor will turn counter clockwise (negative power).

• HINT - for turning in a tight spot, use the two motors.

Page 34: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Turns contd.• To make 180 degree right turn using a tank move or large

motor

!

!

• To make 180 degree right turn using tank move (spin in place)

!

!

• Note the distance travelled is shorter (exactly half) when using both two motors.

Page 35: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 36: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 37: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 38: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Programming Process• Analysis and Planning Steps

• Define the problem• Brainstorm solution and select one• KEEP IT SIMPLE!• Plan and create a flowchart and take measurements

!

• Programming suggestions Divide the program into small pieces Program one pieces at a time Example: Move the robot to black line Once the step is consistently repeatable, go to the next Whenever possible reuse repeatable combination of blocks using MYBLOCK Ask for help

• http://forums.usfirst.org/forumdisplay.php?f=24

Page 39: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Handy Hints• For moving straight,the MOVE STEERING / MOVE TANK blocks have a built-in PID to

regulate the movement of “B” & “C” motors. If one motor falls behind, the MOVE STEERING block compensate by applying less power to the faster motor.

• For driving the robot, use the B & C motor ports; the A and D ports should be used for the robot’s arm.

• Using full motor power (100%) may cause erratic robot movement, use 75% or less.

• Conversely, too little power (below 25%) may cause the robot to stall.

• Brake at the end of each MOVE block to take advantage of the PID which self corrects to achieve more precise moves.

• Using Degrees is a more accurate way to move motors; using time, will be inconsistent when the batteries become weak

• The MOVE STEERING / MOVE TRACK block also keeps track of “errors that accumulate in multiple blocks and adjusts itself.

• Use the brake option and also use the RESET block.

• REMEMBER: the trade off between speed and accuracy!

Page 40: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Why colour & light sensors?

• One of the ways for the robot to know its location is to take advantage of the markings on the field mat.

• How do colour sensors work?

• How to calibrate the colour sensor?

• Common use Programming Examples: Move until a dark line is encountered by the robot, Align the robot with a black line Follow a line

Page 41: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Colour sensors - reflected light mode• The COLOUR SENSOR shines a light on the mat and reads the

reflected brightness level (intensity) level, i.e. dark or bright, to help the robot recognise its position and through programming take action.

• Light intensity ranges from 0-100%

• On a bright (white) area of the mat the light intensity value will be above 50%

• On darker area (blue, black, green,...), the light intensity value will be below 50%

Page 42: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

Writing a program to calibrate the light sensor

Page 43: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

WAIT for light value block• The WAIT block keeps checking for the specified light

intensity value and when the condition is met, the next step in the program is executed

Page 44: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 45: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the

The LOOP Block• Sometimes, there are actions that you want to repeat. The

LOOP block allows you to repeat those actions until an end condition is met (or becomes TRUE).

• Example: make the robot move around a box and return to its starting position

• To move along the box sides, it takes 8 blocks as follows:

Using the loop block

only

Page 46: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the
Page 47: LEGO EV3 Cheats - misssimpson.commisssimpson.com/lego-robots/lego-ev3-cheats.pdf · Firmware • Firmware is the software that is inside the EV3 Brick. Without its firmware, the