
MyBlocks
Presentation
•
Business
•
9th Grade
•
Practice Problem
•
Medium
Jennifer Bertke
Used 2+ times
FREE Resource
20 Slides • 10 Questions
1
modified from work by Sanjay and Arvind Seshan
INTRODUCTION TO MY BLOCKS
2
A My Block is a combination of one or more blocks that you create that can be grouped into a single block
it's custom and can be used in multiple programs
accepts input and renders output
What is a My Block?
3
Multiple Choice
Select the FALSE statement about My Blocks.
My Blocks can be programmed to combine multiple other commands.
My Blocks can be shared with other users and used in other programs.
4
Why Should You Bother?
Because of My Blocks, your missions will look like this…
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
4
Instead of this….
This makes your code easier to read and easier to modify!!!
5
calibration to your build will be required, but you could easily adjust your turns based on map changes without having to guess and check
Examining My Blocks vs Standard
6
Labeling
Which blocks represent My Blocks?
these are typical action blocks
these ones
7
What Makes a Useful My Block
Making My Blocks with inputs and outputs can make them more useful. However, you need to be careful not to make the My Block too complicated.
Question: Look at the list of three My Blocks below. Which ones do you think are useful for to use?
◦ Move5CM (Moves the robot five centimeters)
◦ MoveCM with a centimeter and power input
◦ MoveCM with centimeter, power, angle, coast/brake, etc. inputs
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
5
8
What Makes a Useful My Block
Question: Look at the list of three My Blocks below. Which ones do you think are useful for to use?
Answer:
◦ Move5CM may be used often, but you will be forced to make other My Blocks for other distances. This will not be fixable later.
◦ MoveCM with centimeters and power as inputs is probably the best choice.
◦ MoveCM with centimeters, power, angle, coast/brake, etc. might be most customizable, but some of the inputs might never be used.
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
5
9
Multiple Choice
Which is probably the most useful of the My Blocks listed below?
power on and power off
Move5in : moves the robot 5 inches
MovePowerIn : moves the robot a selected number of inches and power level
MovePowerInAngle Coast/Brake : moves the robot a selected number of inches, power level, and sets coast or brake
10
Step 1: Highlight Blocks
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
6
For this lesson, our goal is to move a desired amount of rotations at a desired power and return the ultrasonic value at the end
• Step 1: Select the two blocks in the code that you want to turn into a My Block
11
Multiple Choice
Based on the lesson goal and the blocks shown, what would be the inputs and outputs for the My Block?
Inputs: power, rotations
Outputs: distance measured by the ultrasonic sensor
Inputs: power
Outputs: rotations, and distance measured by the ultrasonic sensor
Inputs: Power, measurement of the ultrasonic sensor
Outputs: rotations
Inputs: Power, measurement of the ultrasonic sensor, rotations
Outputs: none
12
Step 2: Launch My Block builder
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
7
• A: Go to Tools 🡪 My Block
Builder - If you encounter an error, view the next slide
• B: Pick a My Block Name
• C. Add a Description
• D. Select an Icon for the
whole My Block
Move Rotations and output
Ultrasonic
A
B
C
D
13
Reorder
Reorder the following steps after you have launched the My Block builder:
Go to Tools 🡪 My Block Builder
Pick a My Block Name
Add a Description
Select an Icon for the whole My Block
14
Common Error Messages
◦ SOLUTION: You need to highlight all the blocks again before going into My Block Builder
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
8
ERROR 1: You must be on a diagram with a selection to create a My Block:
15
Common Error Messages
ERROR 2: Start Blocks are not allowed in the selection when creating My Blocks. Remove any Start Blocks from your selection and try making your My Block again.
◦ SOLUTION: Un-highlight the start block before going into My Block Builder
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
8
X
16
Common Error Messages
If you continue to have trouble at this step, just select a single block in your program and create a My Block from it.
You can edit add more blocks to a My Block at any time.
However, you cannot change the inputs and outputs of a My Block after creation.
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
8
17
Multiple Choice
True or False: You should always include a start block in your selections for My Block conversions.
TRUE
FALSE
18
Step 3: Add Inputs/Outputs
A. We need to add two inputs and one output so we will click the +
button three times
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
9
19
Step 3: Add Inputs/Outputs
B. Go back to the first parameter
C. Go to Parameter Setup
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
9
20
Open Ended
What is the difference between an input and an output for your Lego Ev3?
21
Step 4: Setup Parameter for Power
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
10
B. Select Input
A. Pick a Name
D. Choose a default value
Move Rotations and output
Ultrasonic
Set min & max values (only available with slider)
C. Power is a Number
E. Choose button Style
A
B
C
D
E
22
Reorder
Reorder the first broad steps to making My Blocks:
highlight blocks
launch My Block builder
add Inputs/ Outputs
Setup Parameter for power
23
Step 5: Setup Parameter for Rotation
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
11
Move Rotations and output
Ultrasonic
Now click on the
second parameter
A
B
C
D
E
B. Select Input
A. Pick a Name
D. Choose a default value
C. Rotation is a Number
E. Choose button Style
24
Step 6: Setup Parameter for
Ultrasonic
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
12
Move Rotations and output
Ultrasonic
A
B
C
Now click on the
third parameter
B. Select Output
A. Pick a Name
C. Ultrasonic output is a Number
25
Step 7: Setup Parameter Icons
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
13
In this step, we will change the icons for the parameters from “a” to an image of your choice.
A. Click on a parameter
B. Click on the tab Parameter Icons if not already on this tab, and choose an icon
C. Repeat steps A and B for each parameter
D. Press Finish when you are done.
26
Reorder
Reorder the first broad steps to making My Blocks:
highlight blocks
launch My Block builder
add Inputs/ Outputs
Setup Parameter for Power, Rotation, and Ultrasonic
27
Step 8: Add Data Wires
A. When you click Finish (on previous slide) you will see this.
B. Wire up the My Block by dragging a data wire from each parameter to its corresponding slot on the move steering block and sensor block.
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
14
These grey blocks are our inputs/outputs (parameters) that were set up automatically by the My Block Builder
28
Multiple Choice
What is the purpose of a data wire?
To cook food, play music, or control temperature
To transmit data between parts of the programs
to record values experienced by the sensors in the RAM
To make the program easier to read
29
Where is the My Block?
A. Your My Block will appear in the turquoise tab. You can now use this block in any program.
B. Below, the same My Block is used twice. Once to move forward 2 rotations and then backwards 5 rotations.
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
15
30
Credits
This tutorial was created by Sanjay Seshan and Arvind Seshan
© 2015 EV3LESSONS.COM (LAST EDIT 7/06/2016)
16
This work is licensed under a Creative Commons
Attribution-NonCommercial-ShareAlike 4.0 International License.
modified from work by Sanjay and Arvind Seshan
INTRODUCTION TO MY BLOCKS
Show answer
Auto Play
Slide 1 / 30
SLIDE
Similar Resources on Wayground
20 questions
Intensifiers
Presentation
•
9th Grade
22 questions
Figurative Language
Presentation
•
8th Grade
22 questions
Mendelian Genetics
Presentation
•
9th Grade
21 questions
Third conditional
Presentation
•
9th Grade
20 questions
Modifiers
Presentation
•
9th Grade
20 questions
6E: Mutations
Presentation
•
9th Grade
22 questions
CHAPTER 2 WHEN, WHILE
Presentation
•
9th Grade
23 questions
Setting and Mood
Presentation
•
8th Grade
Popular Resources on Wayground
10 questions
Safety Day 2026 – Student Review
Quiz
•
9th Grade
21 questions
Continents and Oceans
Quiz
•
6th Grade
20 questions
Parts of Speech
Quiz
•
5th Grade
16 questions
Subject & Predicate
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
12 questions
Map Skills
Quiz
•
3rd Grade
22 questions
Continents and Oceans
Quiz
•
5th Grade
15 questions
Rounding Decimals
Quiz
•
5th Grade