1 of 49

GOAL

To learn about robots and how to write code to control them

Robotics

Intro to Coding and

Virtual Robot Navigation

2025-08-18_v1.0

2 of 49

2

Breakout Development Team

JULIAN CENTENO

College: SUNY Polytechnic Institute

Major: Mechanical Engineering Technology

KIERA MALLINSON

College: Notre Dame

Major: Electrical Engineering

KRISTINE BUDILL

College: Yale and MIT

Major: Electrical Engineering, BS & MS

Industry Experience: General Electric Aircraft Engines, ITT Fluid Technology, Haemonetics

EMMA O’SHEA

College: Bucknell

Major: Biomedical Engineering

3 of 49

3

Breakout Redevelopment Team

JOSHUA FELICIANO

College: MIT ‘24

Major: Electrical Engineering and Computer Science

BRIANNA MAHON

College: University of Miami ‘26

Major: Civil Engineering

College: University of Notre Dame ‘25

Major: Chemical Engineering

GRACE MARKOVICH

MOLLY TRICKETT

College: University of Notre Dame ‘26

Major: Computer Science

PAT MARSHALL

College: University of Illinois at Urbana-Champaign

Major: Civil Engineering

Industry Experience: Road Construction, Wastewater Treatment

4 of 49

4

Outline:

  1. Introduction to Robots
  2. Coding Robotic Systems
  3. Putting it all Together:

the Maze

Extension Activities

  • Coding a Maze in Python
  • FIRST Virtual Robotics

We would like to see most students be able to finish through the Maze Challenge in the allotted time frame! If you finish, feel free to try our extension activities.

5 of 49

5

PART 1

Introduction to Robots

6 of 49

ANSWER ME!

Define the three criteria used to define an object as a robot or not:

Type your answer here.

What is a Robot?

In what situations/locations might robots be useful?

Type your answer here.

This video will help you understand more about robots.

6

7 of 49

7

ANSWER ME!

Using this definition, can you name some examples of robots or robotic systems in everyday life?

Type your answer here.

Definition of a Robot

8 of 49

8

8

Examples of Robotic Systems We See in Our Everyday Lives

AMAZON ALEXA

REMOTE VACUUMS

SMART WASHING MACHINES

9 of 49

ANSWER ME!

What sensors allowed the car to function?

Type your answer here.

Autonomous Vehicles

How can we teach a car to use sensor information?

Type your answer here.

Another example of a robot is an autonomous vehicle. This video will help you better understand how autonomous vehicles operate.

9

10 of 49

10

Benefits of Robots

Robots can be helpful in a number of ways. They can increase safety, productivity, and accuracy.

SAFETY

Robots can lift heavy loads and perform tasks in environments not safe for humans.

PRODUCTIVITY

Robots can perform monotonous tasks over and over again. Their rate of performing a task remains constant throughout the day.

ACCURACY

Robots can be accurate to within a fraction of an inch when performing a task. Unlike humans, they have sensors and actuators that accurately sense and perform tasks. This can reduce wasted materials.

11 of 49

11

The Essential Question

Now that you know a bit about robots, you are ready to learn how to write code to control them!

You will be introduced to the coding design process and learn how to write block based code so that you can solve the challenge:

Robot recap:

Machine that interacts with its environment, makes decisions based on its surroundings, and carries out jobs related to its goal

Key features of robots include:

  • Occupy physical space
  • Sense features of their environment
  • Make computations
  • Include mechanical parts

Applications include:

  • Perform repetitive tasks
  • Work in dangerous environments
  • Assist humans with complex tasks

How can I write code to successfully move a virtual robot through a maze?

12 of 49

12

PART 2

Coding Robotic Systems

13 of 49

13

13

The Coding Design Process

Write code that follows the design made in the previous step.

Write Code

How can you go about addressing goals and/or fixing the problems?

Design

Analyze your new code and look for what can be improved.

Identify Problems

NOTE:

Development of code follows a process very much like the engineering design process that includes iterative rounds of design, building, and testing before the final product is released.

Possible improvements:

  • Fewer lines of code
  • Faster run time
  • More accurate performance of the task

Remember:

Designing before coding

leads to better and more efficient code.

14 of 49

14

Introduction to Block Coding

  • Block-based coding utilizes a drag-and-drop learning environment, where programmers use coding instruction “blocks” to construct programs

  • Traditional text-based code commands are converted into blocks

  • Block coding is used as both an introduction to the world of coding, as well as for larger scale operations to reduce the amount of bugs in the code

CODING:

TEXT BASED vs BLOCK BASED

15 of 49

15

15

Getting Started with VexVR

FOLLOW THESE DIRECTIONS

  1. Go to https://vr.vex.com/
  2. Select “Continue to Free”
  3. Click through and follow the quick tutorial. If you are new to this platform it may be useful to go to Tutorials → Getting Started Tour

16 of 49

16

16

Writing Your First Program

SAMPLE PROGRAM

Let’s make a vehicle move forward, turn right and move forward again as seen in the code on the right

  • Starting block for any code - from the “Events” Menu, choose the following block:

  • Movement - from the “Drivetrain” Menu, chose the 4 blue blocks picture on the right. Attach the blocks together in the order shown. Note: Code is always read from top to bottom in the order you arrange them
  • Run the code - Find playgrounds in the top menu and select “Grid Map”

  • Movement -Press the black triangle to start. Your bot should move up one block, turn and move another block. Notice that it move exactly one block each time which should tell you that 200 mm is the size of a block. Keep that in mind.

17 of 49

17

17

Hard-Coding*

FOLLOW THESE DIRECTIONS

Take your existing code and change it so that your bot moves in a square that is 2 blocks by 2 blocks. What do you think we need to change?

  1. If you want to move a distance of two blocks then change your distance to 400 mm for both movements.
  2. PSEUDOCODE ALERT→ Pseudocode is a way to describe what your code should do in English before you try and work it out with code:

“You want to move forward, turn right, move forward, turn right, move forward, turn right so you are back where you began pointing up”

  • You will notice a scattered group of block code to the right. How would you arrange them to make your bot go in a square
  • How would you add the purple blocks to draw while you move in a square?
  • Put your code together and test it.
  • When you have something that works place in on the next slide

NOTE: THERE IS AN EASIER WAY TO COMPLETE THIS TAKE WHICH YOU WILL LEARN IN FOLLOWING SLIDES :)

18 of 49

18

Show us your code and drawing!

ANSWER ME!

Take a screenshot of your code and shape that you draw.

Remember: it is important to explicitly tell the robot everything you want it to do, as it cannot think for itself.

19 of 49

19

19

Solutions

Move in a square

Draw a square

NOTE: THERE IS AN EASIER WAY TO COMPLETE THIS TAKE WHICH YOU WILL LEARN IN FOLLOWING SLIDES :)

20 of 49

20

20

Quick Challenge: Make an Equilateral Triangle

AN EXAMPLE OF A LOOP TO DRAW A SHAPE…

  • You can “hard-code” this which means making the robot go through movements line by line and not using any LOOPS.
  • You may have already known the characteristics of an equilateral triangle are but we have given them above as a reference.
  • The challenge is to code blocks that will precisely turn and move your robot in this shape.
  • You may want to sketch this out on paper
  • Make sure you add the draw function so you see your final shape.
  • Have fun!
  • Place your answer on the next slide.

21 of 49

21

Show us your code and drawing!

ANSWER ME!

Take a screenshot of your code and shape that you draw.

Remember: it is important to explicitly tell the robot everything you want it to do, as it cannot think for itself.

22 of 49

22

22

Loops

In your previous square code you may have noticed repetitive lines of code.

A cleaner way to code something like that is to take some lines of code and put them in a loop and have it repeat as many times as needed

AN EXAMPLE OF A LOOP TO DRAW A SHAPE…

  • The repeated lines of code are shown here

  • How many of these do we need to make a square? Place that in the “repeat” space.
  • Create the code shown and run it.
  • Play with distances and size.
  • Play with angle. What silly shapes can you make?

Repeating 4x Block

23 of 49

23

23

Quick Challenge: Make a rectangle using a loop

  • You can make a rectangle of any size
  • Think about what lines of code repeat, and what does not
  • How many times should you “repeat”?
  • Use the least amount of code possible to “draw” the shape.

24 of 49

24

24

Loops: An Extra Challenge! (Optional)

Loops can be manipulated in a variety of ways to make even more complicated designs.

On the right is an example of a complex loop that continuously layers shapes on top of each other to create a design.

Feel free to take on this challenge and attempt to create your own version of this example!

If you choose to complete this code, submit additional screenshots to the following slide.

AN EXAMPLE OF A COMPLEX SHAPE DRAWING…

25 of 49

25

Show us your code and drawing!

ANSWER ME!

Take a screenshot of your code and shape that you draw.

Remember: it is important to explicitly tell the robot everything you want it to do, as it cannot think for itself.

26 of 49

26

26

Variables (Optional)

We can use variables in VexVR to develop more advanced and detailed code! If you have previous python experience, feel free to use variables to to make a program that can draw a shape of any number of sides.

FOLLOW THESE DIRECTIONS

  • In the Block code editor for your sprite, click “Variables” from the block menu and click “Make a Variable”: name your variable something meaningful, like “number of sides”.
  • Set the value of the variable you made to the number of sides you want your shape to have
  • In your “repeat” block, replace the number of repetitions with a “number of sides” variable block.
  • In your “turn” block, replace the number of degrees with a division block from the “Operator” menu. The division block should be “360 / number of sides”.
  • Run your code with different numbers of sides and watch your sprite draw them! Feel free to keep playing with the code to see if you make it better (e.g., recentering the shape, slowing down the drawing, etc.).

THE SETUP FOR YOUR VARIABLE SHAPE-DRAWING PROGRAM…

Using Variables to solve is optional. You can still code a solution to the later challenges without them.

27 of 49

27

27

Conditionals Introduction

Let’s make a program that uses a conditional statement!

We will put your robot in a field with obstacles and try to avoid them

FOLLOW THESE DIRECTIONS

  • Have your bot move forward at the start using a line of code.
  • Go to the “Control” blocks and select the following block
  • Go to the “Operators” blocks and find the following

  • Go to the “Sensing” blocks.

  • Combine those blocks together like this:

  • This is read “If the front of the bot is less than 50 mm from an object then….”

Change the camera angle for a different point of view

Disc Mover Playground

28 of 49

28

28

Conditionals Example #1

  • Create the code shown below
  • Observe what it does.
  • It avoids hitting the walls but moves in a repeating pattern.
  • Do not switch your code. Go to “Select Playground” and choose Wall Maze (Not Dynamic).
  • Run the code.
  • Nothing great happens, it runs off the board.
  • We need to create a way to “Check” our environment using more sensors.
  • First let’s try to navigate using hard coding on the next slide

Change the camera angle for a different point of view

Disc Mover Playground

29 of 49

29

29

Hard Code a path through the Maze

Choose your adventure:

  1. Create a code that forces your robot to go to “A” then “B” and stops there. What distances and turns do you need to include?

  • Create a code that forces your robot to go to “1” then “2” and stops there. What distances and turns do you need to include?

  • Can you take what you have done and complete the path? A-D or 1-4?

  • Show us your code on the next page

Maze

30 of 49

30

Turn your code and drawing in

ANSWER ME!

Take a screenshot of your code and shape that you draw.

Remember: it is important to explicitly tell the robot everything you want it to do, as it cannot think for itself.

31 of 49

31

31

Use Conditionals to “Find” your path

  1. Create a new code that has your bot move forward until it gets close to a wall (50 mm)
  2. Then the bot turns right and checks the distance. If the distance is less than 50 mm, then rotate left 180 degrees and check the distance. If it’s greater than 50, then move forward.
  3. It could look something like the code on the right.
  4. Try it out. It is an improvement but the robot will not navigate the whole maze.
  5. What can you add on that will improve this?

Maze

32 of 49

32

Reflection

What programming tools have you learned so far?

How could you use these tools to guide a sprite through a maze?

32

33 of 49

33

PART 3

Putting it all Together:

Can you trace out your birth date? Choose a date in history, who can trace it the fastest?

Can you code your bot to knock down as many blocks as possible no matter where they appear (dynamic).

BEGINNER

INTERMEDIATE

EXPERT

Navigate the dynamic mazes as quickly as you can. Think about what iterations (checks) help your bot decide where to go.

34 of 49

34

Now that you have developed your robotics coding skills, it’s time to put them to the test !

The main challenge of this lab is to code your robot to successfully navigate the different variations of the Dynamic Wall Maze. If you feel like you need more practice before you start, start off with the beginner or intermediate challenges.

The instructions for the different challenge levels are on the following slides

PART 3

Putting it all together

BEGINNER

INTERMEDIATE

EXPERT

35 of 49

35

Can you trace out your birth date? Choose a date in history, who can trace it the fastest?

Can you code your bot to knock down as many blocks as possible no matter where they appear (dynamic).

BEGINNER

INTERMEDIATE

  1. Open Number Grid Map under “Select Playground”.
  2. Plan out the corresponding Day-Month-Year boxes that you want your robot to drive to.
  3. Use the “Looks” Blocks to code your robot to draw on/fill in the necessary boxes.
  • Open Dynamic Castle Crasher under “Select Playground”.
  • Code your robot to knock over any blocks on the map.
  • Code your robot to run without falling off the edges of the map.

36 of 49

36

36

36

EXPERT

Navigate the dynamic mazes as quickly as you can. Think about what iterations (checks) help your bot decide where to go.

  • Open Dynamic Wall Maze under “Select Playground”.
  • Plan out Pseudocode for how you want your robot to navigate different circumstances while in the maze.
  • Translate your Pseudocode to Block code
  • Test your solution to make sure it works on different maps.

RECALL:

Pseudocode is simply describing what your code should do in English before you try and work it out with real code.

EX: “Go forward 20 steps then turn left…”

37 of 49

Robot Components

Used to pick up disks

Visualize your virtual robot as a real physical body by checking out these labeled images:

Example of Robot seen in VEXcode VR

Example of First Robotics Robot

37

38 of 49

38

Continue to Explore

IF YOU LIKED TODAY’S BREAKOUT, �YOU MAY BE INTERESTED IN THESE TOPICS:

  • Robotics
  • Electrical Engineering
  • Mechatronics
  • Computer Science/ Computer Engineering
  • Mechanical Engineering

TYPES OF ENGINEERING RELEVANT TO TODAY’S ROBOTICS BREAKOUT:

  • Artificial Intelligence
  • Programming
  • Ultrasonic Sensing
  • Pathfinding in Robotics
  • Applications of Robots

39 of 49

39

https://www.youtube.com/watch?v=FA27O7yy90Q

Additional Resources to Check Out

Related Links

BATTLEBOTS

ROBOT DOG COMPETITION

ROBOTS DANCING

40 of 49

40

Reflect on Your Design and Results

ANSWER ME!

Write your answer here

What do you think went well when completing this activity?

Write your answer here

What is something you would do differently if you were to do this again?

Complete the mandatory 5-minute Exit Ticket by clicking here!

41 of 49

Further Extension Activities

Any text here?

Python Coding

Virtual Robotics

42 of 49

42

EXTENSION 1:

Coding a Maze in Python

43 of 49

43

Extension 1: Maze Mayhem with Python

Your Challenge:

  1. Try the maze activity (with or without an enemy), this time using Python text-based coding
  2. Is it faster or slower than block coding?

Pro tip: If you cannot figure out a command in Python, go back to your block code and hit </> on the right side of the screen and it will show you your block code in Python!

from mblock import event

# initialize variables

@event.greenflag

def on_greenflag():

sprite.clear()

sprite.pendown()

sprite.direction = 90

while True:

If sprite.touching_color('#000000'):

sprite.forward(-0.5)

sprite.right(10)

else:

sprite.left(8)

sprite.forward(2)

43

44 of 49

44

Turn your code in

ANSWER ME!

Take a screenshot of your code in python. Copy and paste the screenshot of your block code from before.

Remember: it is important to use the correct syntax and wording in python.

45 of 49

45

ANSWER ME! What was challenging about coding in python? �What are the pros and cons of using python?

Write your answer here.

Analysis: Python Coding

46 of 49

46

Further Extension Activities

Any text here?

Python Coding

Virtual Robotics

47 of 49

47

EXTENSION 2:

FIRST Virtual Robotics

48 of 49

48

Taking it to the next level

FIRST Robotics is a International Competition with many age levels from elementary to college. This is their online robotic simulator.

You can build your own robots and test them in an arena

Compete with sensors and game elements.

This is quite a bit more advanced than what we have done and might take some research before you feel successful.

Tutorials

49 of 49

Thank you!

Any text here?