使用 NXT 的多线程
在我的机器人俱乐部,我们正在尝试让多线程功能在 LEGO Mindstorms NXT 上运行,但似乎线程相互干扰并导致程序完全停止。
有谁知道如何在NXT可视化编程环境上正确实现多线程。
At my robotics club we are trying to get the multi-threading capability to work on LEGO Mindstorms NXT, but it seems that the threads are interfering with each other and causing the program to stop entirely.
Does anyone know how to correctly implement multi-threading on the NXT visual programming environment.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
有人知道如何在NXT可视化编程环境上正确实现多线程吗?
是的,很多人都知道如何在NXT可视化编程环境上实现多线程。
但是,除非您更具体,否则您将无法找出您的特定问题出了什么问题。 不过,也有很多陷阱。
例如,如果循环中有两个线程,则在两个线程完成之前循环不会循环。
还有很多其他的 - 太多了,无法在这里一一列举 - 所以开始一点一点地调试你的程序,并发布你的“代码”示例(屏幕截图?),然后描述它正在做什么,以及你希望它做什么。
Does anyone know how to correctly implement multi-threading on the NXT visual programming environment?
Yes, lots of people know how to implement multi-threading on the NXT visual programming environment.
Unless you are more specific, though, you aren't going to find out what's wrong with your particular problem. There are lots of gotchas, though.
For instance, if you have two threads inside a loop, the loop will not loop until BOTH threads complete.
There are many others - too many to enumerate here - so start debugging your program piece by piece, and post examples of your 'code' (screenshots?) and then describe what it's doing, and what you want it to do.
本关于多个任务的教程可能正是您正在寻找的内容:
多个任务
This tutorial on multiple tasks may be what your are looking for:
Multiple Tasks