Building Smart LEGO MINDSTORMS EV3 Robots
上QQ阅读APP看书,第一时间看更新

Fire!

When the turret locks on to the beacon, the robot will fire two projectiles. The medium motor in port A controls the ball-launching mechanism. We will program the turret to fire based on the heading reading provided by IR 2. If the heading value is zero, then the turret is aimed directly at the beacon, and the robot can fire.