Chitti is better in the app

Coins, streaks and builds — free on Android & iOS

Get the app
Chitti

Bumper Sensor

4 Minutes · Module 4 - Destroying Robot

Bumper sensor programming for kids: learn how to detect objects faster and stop robot rotation in simulation. A Tamil robotics lesson.

  • Identifying why the robot only clears objects in the center
  • Using an if condition with the left bumper sensor to turn
  • Stopping the project after drive rotation reaches a degree limit

What this lesson teaches

A bumper sensor is a touch sensor placed on a robot to detect physical contact with surrounding objects. When an object hits the sensor, the robot senses the touch and can immediately turn or redirect its movement.

Detecting side objects

  • In the dynamic castle crusher challenge, an early program took five minutes because the robot only saw objects directly in the middle.
  • Any castle sitting to the left or right was missed entirely and left standing on the field.
  • Both the left bumper and right bumper can detect things as soon as physical contact occurs.
  • Using bumper touch feedback allows the robot to steer toward side obstacles and clear them much faster.

Programming the left bumper

An if condition block from the control category is added underneath the drive forward block to react to collisions. The sensing block labeled left bumper pressed is placed inside this condition. Whenever the left bumper touches a castle, the program commands the robot to turn left. Adding this check enables the robot to knock down objects far more quickly than searching only down the center.

Solving corner castle errors

  • At the end of a run, a final castle may stay trapped near a corner while the robot rotates continuously.
  • This failure happens if the robot is restricted to moving only 100 millimeters across the red line.
  • Allowing the robot to advance 110 millimeters or 120 millimeters past the red line lets it reach and clear the final corner castle.

Stopping rotation with degree limits

A robot may endlessly spin in circles if it fails to hit an object, so the project must be forced to stop at a specific point. The playground tracks drive rotation, which can climb past 15,000 degrees during long runs. An if condition using a greater than comparison operator tests whether the drive rotation in degrees goes over a limit like 16,000 or 20,000. Under this condition, adding a stop project block halts the entire program automatically once that rotation degree is reached.

Part of the course

ROBOTIC SIMULATION

View course →

More in Module 4 - Destroying Robot

  1. 1Destroying Robots5 Minutes
  2. 2Bumper SensorNow playing