NXT lejos允许2个电机同时移动 [英] NXT lejos let 2 motors move at the same time
本文介绍了NXT lejos允许2个电机同时移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何只用一个命令让NXT的两个电机同时移动?
How can I let both motors of the NXT move at the same time with just one command?
推荐答案
一个命令是不可能的。它只使用以下代码:
Motor.A.forward();
Motor.B.forward();
Motor.A.turnTo(xy);
Motor.B.turnTo(xy);
Motor.A.stop();
Motor.B.stop();
xy = motordegrees
One command is not possible. It just works with the following code:
Motor.A.forward();
Motor.B.forward();
Motor.A.turnTo(xy);
Motor.B.turnTo(xy);
Motor.A.stop();
Motor.B.stop();
xy = motordegrees
这篇关于NXT lejos允许2个电机同时移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文