Course 2:

Robot programming basics

Write code to control your Lego robot! You will learn how to communicate with your robot, and how to write programs using an easy to use programming language called SNAP.

Beginner level
Category: Robotics 💬 English

What Will I Learn?

  • Learn to use SNAP.
  • Learn to save and load your projects.
  • Learn to use events.
  • Learn to use loops in the program.
  • Learn to use variables and operators in the program
  • Learn to use nested loops and conditions.
  • Learn to making blocks.
  • Learn to use broadcast events


Start this course

Curriculum For This Course

Lecture 1: My first "hello robot" program
This lecture shows you how to start robot programming. You will learn the features of the programming environment. You will get familiar with the graphical user interface. You will learn the most important terms, such as script, block, etc. and you will create your first Hello robot program using drag-and-drop. After completing this lecture you will be able to display a smile face on the Lego brick's LCD screen and you will be able to play a beep sound on the Lego brick's speaker.
Lecture 2: Saving and loading my project, writing sequential programs
In this lecture you will learn how to save and load your code. You will learn how to write a sequential program. You will be able to play a melody on the brick's speaker and you will be able to display emotions using happy, sad or smiley faces. Plus you will also learn how to coordinate sounds with other tasks.
Lecture 3: Using loops to repeat tasks
You will learn how to use loops to repeat tasks. You will learn the term infinite loop and a loop with a speficied number of steps. You will see how loops can be used to simplify programs. This lecture includes tasks to move your robot around a route using loops. You will see how various patterns can be followed with the help of loops.
Lecture 4: Understanding events
Modern programing is more about processing events then about writing algorithms. In this lecture you will learn how to detect events, and how to react to them. You will see how your robot can react to changes detected by sensors, and how you can react to events coming from the user interface, such as a keyboard key press. You will write different programs in this lecture, for example a program to control a robot form the keyboard, and another one, that reacts to events by displaying emoji icons on the LCD display.
Lecture 5: Understanding conditions (and using sensors)
In this lecture you will learn and understand how to use if-else statements. It is very important to be able to write conditions, that work with information received from robot sensors. You will practice the syntax, and you will see how to use conditions in different parts of a robot control program.
Lecture 6: Using variables and operators
Variables are essential for programs that maintain state information or that work with input received from sensors. In this lecture you will learn how to create and use variables. For example you will learn how to increase a counter variable on a button sensor event. Another program will be written to process events received from the Infra Red (IR) sensor with the help of variables.
Lecture 7: Using nested loops and conditions
In this lecture you will learn what a nested loop is and you will see how it can be used. You will also learn how to break loop cycles using conditions. You will see how a sensor value received from a robot sensor can be used to control how your loops operate.
Lecture 8: Making blocks
Program blocks are often called as functions or procedures in program languages. Without program blocks it is not advisable to write larger programs, that complete more advanced tasks. In this lecture you will learn how create custom proram blocks. You will also learn how to edit, delete previously created blocks, and how to execute the functionality defined within a program block.
Lecture 9: Making blocks with input and return value
A program block contains a series of steps. To make a block more intelligent, you can add input and output functionality to it. In this lecture you will learn how to create input variables, how to return a result and how to use the result of a program block in a condition.
Lecture 10: Using broadcast events
Broadcast events are messages sent from one part of a program to one or more other parts. In robotics they can be used to handle unexpected situations. For exmaple if an emergency stop button is pressed, a broadcast event can be sent to various parts of the robot control code to stop all operations. This lecture explains how to create and how to use broadcast events.
Start this course


  • This course is designed to suit users of either the EV3 home edition or the EV3 education edition.
  • Users are required to have a Windows 10 PC.
  • Users will need to download Ozeki 10 from
  • Users will need to know the basics of Ozeki 10 and Lego robots. Read more information in this course.


You can controll your robots through Ozeki 10. Since it recognizes your motors, sensors, etc. automatically you can use them. Ozeki 10 has a built-in application called SNAP to make simple programs. Lego robots can be easily programmed by using SNAP. You have to connect your Lego robot to Ozeki 10 to use SNAP.

This course is designed to get you started with programming. It shows you how to start SNAP and understand the GUI and write some simple program. You will learn how to save and load your projects in SNAP, how to use loops to repeat tasks, how to use events, how to use 'if-else', how to use variables and operators and how to making blocks and what can you do with them, and finally you will see how you can use broadcast events.

The lectures in the course provide easy to follow step-by-step instructions and quiz questions. Enjoy the course!

Who is the target audience?

This course is designed for learners who are intersted in learing SNAP basics and programming the Lego robots.

Reference materials

Snap reference manual: SnapManual.pdf (source:

Start this course


Copyright © 2000- - Ozeki Ltd |
Home > Courses > Course 2 - Robot Programming Basics
Legal | Privacy | Terms of use | 6190 | | Login