Sometimes while running a program, your robot will do something unexpected that you don’t think you programmed it to do. Debugging these runtime errors can be tricky since no error messages will come up. But there are tools and methods that can help you easily diagnose the unexpected behaviour and fix what is causing them.
- [Voiceover] Runtime errors are problems that happen…when a program is running that causes…unexpected behavior from the robot.…There's nothing wrong with the program.…The robot is doing exactly what it's been told to do.…However, what it's doing wasn't what…the programmer intended it to do…so it's considered an error.…An example in real life would be…if someone asked you, "Is dinner ready?"…And you replied with, "In a minute."…Then exactly 60 seconds later they come back…and ask you again, "Is dinner ready?"…Which is not what you meant.…
When you said, "In a minute," what you really meant…was, "Sometime soon," but they took it…to mean exactly one minute.…You may think they're taking your words too literally,…but that's exactly what a robot does with a program.…Errors like these are hard to fix because…it's not always easy to find the root of the problem.…Unlike compile errors, runtime errors…don't provide an error message.…So you'll have to do some investigation…or debugging to figure out what's wrong.…I've opened project 08_02_Debug_Start,…
AuthorOlivia Chiu Stone
Learn how to unpack the hardware, connect to the programming interface, run prebuilt programs, and control the motors and sensors. Chapter 6, "Adding Flow to a Program," covers advanced programming topics such as transferring data between blocks, using variables to store temporary data, programming conditional logic, and looping actions to run again and again. By the end of the course, you'll have the skills to bring your own robotic creations to life.
- Installing the LEGO Mindstorms software
- Exploring the programming interface
- Connecting to the EV3 brick
- Downloading and running prebuilt programs
- Coordinating motor movement
- Calibrating the sensors
- Transferring data with data wires
- Adding logic with switch blocks
- Looping actions
- Troubleshooting problems with LEGO Mindstorms
- Broadcasting sounds and displaying images
- Updating LEGO Mindstorms
Skill Level Beginner
1. Getting Started
3. Explore a New Project
4. Connect with the EV3 Brick
5. Program Movement and Sensing
6. Adding Flow to a Program
7. Document Your Work
8. Troubleshoot Problems
9. Extra Tools
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.