Program for the EV3 tug of war with touch sensors

This is an example program for tug of war with two touch sensors. The game can be played with almost any robot, so we used:, because it is the simplest. You have to attach two touch sensors at ports 1 and 4, preferably with long cables. You can also add a color sensor to port 3, which will detect when to end the game, although this is not required. The game is simple, two human players click the touch sensors as fast as they can. The robot moves in the direction of the one that clicks the fastest and the goal is to bring it to your finish line.

The program teaches about counters and flags. A big part of it is the good names of variables and loops and the addition to plenty of comments, from which students can learn how to form their program.

How to open?

Programs with extension *.ev3 could be opened EV3 Lab Software sometimes referred to as EV3-G. It could be found throught theĀ EV3 Lab Software section on the LEGO Website.

  • #7iyau9
  • 21 Nov 2019

Courses and lessons with this Program

This Program is used in the following courses and lessons

Image for Robotics with LEGO - Level 4.5 Game Time
  • 35
  • 13:40
  • 221