Two days before the district robotics competition, the team’s robot refused to turn left. It rolled forward perfectly and turned right without a problem, but every time Maya pressed the left arrow, it shuddered, beeped, and stopped. The four members of the Lincoln Elementary Robotics Club stared at it in silence.
“Maybe we should just program it to turn right three times,” Andre suggested. Everyone laughed, but nobody had a better idea.
Their coach, Ms. Delgado, refused to give them the answer. Instead, she handed Maya a notebook and asked the team to test one thing at a time and write down exactly what happened. First they swapped the batteries, but the robot still stopped. Then they checked every wire on the left motor. Finally, Jun scrolled through the program line by line and noticed that someone had typed a negative sign in front of the left motor’s speed. The robot had been trying to spin both wheels in opposite directions at once.
Jun deleted the tiny dash, and the robot spun smoothly to the left. At the competition, the team finished in fourth place, but Ms. Delgado said the notebook was the best thing they had built all season.