Chitti app logo

Chitti is better in the app

Coins, streaks and builds — free on Android & iOS

Get the app
Chitti logoChitti

Blocks-2

7 Minutes · Module 1 - Simulation

Robotics coding blocks for students: learn variables, operators, sensors, and control blocks in Vex VR. A Tamil robotics lesson.

  • Creating a sensor variable and using operator blocks in Vex VR
  • Viewing live robot sensor data on the monitor while moving
  • Programming wall avoidance with if-else, forever, and wait until
What this lesson teachesRead the lesson as text

Programming blocks in Vex VR give a virtual robot the ability to store data, calculate values, read sensors, and make decisions while moving.

Variables and operators

A variable acts as a storage area to hold sensor values and numbers used throughout a program. A new variable is created by selecting make a variable under the variables menu and giving it a name such as sensor. The operators category provides two sets of tools: the first four blocks perform basic arithmetic operations, while the three blocks below them carry out comparative operations.

Tracking sensor data on the monitor

  • Sensors track live data as the robot moves around the canvas, and ticking them displays their readings directly on the monitor.
  • The monitor can display the total run time, whether the drive train is moving or turning, and the drive heading in degrees.
  • It also tracks the left bumper, detects whether an object is present in front, and measures the distance to that object.
  • Viewing these live changes helps users understand how each sensor responds during movement.

Decision making with if-else and forever blocks

Control blocks guide the decisions a robot makes in different situations, similar to stopping at a red traffic signal and moving otherwise. In a four-walled playground, an if-else block checks if the front eye is near an object; if true, the robot turns right, and if false, it drives forward. Because an if-else block executes only once on its own, it must be placed inside a forever block so the robot checks for walls continuously. Any blocks placed inside a forever block will keep executing repeatedly without stopping.

Waiting and repeating conditions

Control blocks also include wait until and repeat until blocks to handle conditions over time. The wait until block pauses the robot until a condition happens, much like a person waiting at a park gate until a friend arrives. The repeat until block keeps performing an action continuously until a condition is met, similar to staying on a swing until a friend reaches the park. Both blocks allow the robot to coordinate its actions based on specific events.

Part of the course

ROBOTIC SIMULATION

View course →

More in Module 1 - Simulation

  1. 1Robotics Simulation3 Minutes
  2. 2Virtual Robots4 Minutes
  3. 3Blocks6 Minutes
  4. 4Blocks-2Now playing