top of page

Advanced Level 1 

Lesson 1

Programming

Robots don't think like people, so how do we communicate with them? Let's find out by learning about programming!

If you have never programmed before, follow the steps in the intermediate lessons to learn the basics!

In the advanced section we will be using these skills from previous lessons:

  • Conditional Statements

  • Loops

So make sure you understand these before moving on!

Step 1: Watch this video to learn about sensors!

Humans perceive the world through senses: touch, smell, sight, hearing, and taste. Robots understand their surroundings in a similar way, but instead of using eyes, ears, nose, mouth, or hands, they use sensors!

Step 2: Let's learn some basic types of sensors

We are going to start with two types of sensors:

  • Bump sensor

  • Ultrasonic sensor

Bump Sensor:

also known as a touch sensor, senses physical touch to help a robot avoid obstacles

Ultrasonic Sensor:

also known as a distance sensor, measures distance by emitting ultrasonic waves and measuring the time it takes for the waves to be reflected back to the sensor

*if you need more help understanding ultrasonic sensors, click the icon to watch a video

Step 3: Let's use VEX VR to practice writing code with ultrasonic (distance) sensors!

First, open VEX VR, which is exactly like Scratch, by clicking the button below.

Then, watch the video to understand how distance sensors work in VEX VR.

Step 4: Maze Activity!

Now that you understand how the sensors work, follow the steps to move your robot through a maze using distance sensors:

  1. Open "Playground" in the toolbar at the top of the page

  2. In the dropdown at the top of the window, select "Wall Maze"

  3. Use distance sensors and move blocks to move the robot through the maze to the red and black checkered finish line

  4. Hover over the box below to check your code!

Maze Code Solution

If you want more practice with the distance sensor, click on the buttons below to complete challenges from VEX!

© 2023 by STEM Camp. Proudly created with Wix.com

bottom of page