【发布时间】:2014-08-06 16:22:32
【问题描述】:
我正在尝试开发一个运行电机的 Windows Phone 应用程序。我只想执行 MoveCar 方法 1 秒,然后执行 Stop。
我有这段代码可以正确移动 C 电机:
CarControl _cc;
private void UP_Motor_C(object sender, RoutedEventArgs e)
{
_cc.Turn = 50; //the C motor will start running in 50% speed
_cc.LeftSpeed = 0; //the B motor will stop working
_cc.RightSpeed = 0; //the A motor will stop working
_cc.MoveCar();
}
我的问题是我缺少启动 MoveCar 的代码,仅持续一秒钟。实现我想要的最佳方式是什么?
【问题讨论】:
-
我猜 NXT 框架中有一些东西可以为你做到这一点......
-
索要代码但不努力会让你被否决。
-
欢迎来到 Stackoverflow!在移动一秒钟然后停下来之前先看看游览! stackoverflow.com/tour