如何调试 Lego Mindstorms 程序?
使用 NXT 拖放环境时,有什么方法可以向 Lego Mindstorms 程序添加任何类型的调试吗?
能够监控各种传感器的状态固然很好,但甚至知道程序中正在运行的步骤也更好。
Is there any way to add any sort of debugging to a Lego Mindstorms program, when using the NXT drag-and-drop environment?
It would be nice to be able to monitor the status of the various sensors, but even knowing what step in the program was running would be nice.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
事实证明,这在NXT环境中是可能的。
我找到了一个执行以下步骤的示例:
现在,当您运行它时,显示屏将不断更新来自传感器的值
所以它并不比 printf 语句好多少,但你知道,我用这种技术完成了很多编程:)
It turns out that this is possible in the NXT environment.
I found an example that walked thru the following steps:
Now, when you run it, the display will continually update with the values coming from the sensor.
So it's not a whole lot better than printf statements, but you know, I got a lot of programming done with that technique :)
我不知道你是否可以使用NXT环境来做到这一点,但是你可以使用Java来代替,也许在那里,你可以做到这一点。几年前,我买了一本关于使用 Java 进行 Mindstorms 开发主题的书。但我实际上从未用它做过任何事情。我认为是这个:
http://www.amazon.com/Programming-Lego-Mindstorms-Java-CD- ROM/dp/1928994555/ref=pd_bxgy_b_img_b
看起来他们正在进行调试,所以如果您愿意脱离 NXT 环境,这可能是一个选择。看起来亚马逊上只有一本关于这个主题的 NXT 书,而且还没有出版,哇——已经有一些严重的负面评论了。不知道这是怎么发生的......
I don't know if you can do it with the NXT environment, but you can use Java instead, and maybe there, you can do it. I bought a book a few years ago on the topic of developing for Mindstorms with Java. I never actually did anything with it though. I think it was this one:
http://www.amazon.com/Programming-Lego-Mindstorms-Java-CD-ROM/dp/1928994555/ref=pd_bxgy_b_img_b
Looks like they get into debugging, so that may be an option, if you were willing to get outside of the NXT environment. Looks like there's only one NXT book on the subject at Amazon, and it's not yet out, and wow - there are alredy some severely negative reviews. Not sure how that happens...