Random motion

How could you program a robot to move with random motion?

Here is a possible approach for NXT. This code will run Motor A in a random direction (via a Random-Comparison Block combination), at a random speed, for a random amount of time. The motor speeds will fall between 0-100 and the time will fall between 0-3 seconds.

Random Motion


The following two tabs change content below.


The Tufts Center for Engineering Education and Outreach (CEEO) in Boston, Massachusetts, is dedicated to improving engineering education in the classroom, from Kindergarten to college. The Center houses faculty, staff, and graduate students from engineering disciplines and the education department.

Latest posts by CEEO (see all)

Leave a Reply