When I work on the NXT Direct Commands (to control eg an engine without an external program) it works.
Now I want to send messages to the mailbox of the NXT. The messages would be processed by an external program. That does not work. What is wrong?
(Smartphone app sends message to NXT, LabVIEW VI reads mailbox from NXT)
Are you using / have you used the NI software to communicate to the NXT? I think I am also a bit unclear exactly what is not working properly. I guess my biggest question is what type of software package are you using to communicate to the NXT?
I haven't looked too much into NI's software extension for the NXT, but in general NI software tends to use modules (VI's) that are custom written for their software and don't translate over to text-based programming too easily. An example of this might be the "mailbox" you mention. To my knowledge, the NXT does not have a mailbox and indeed may be NI lingo for handling received messages.
One point above that Steve mentioned above was that its always good to turn on your message response, or received messages, as they might be able to tell you what's going on.
If you could maybe expand upon your issues a bit more - I might be able to offer a bit more insight. Thanks!
Are you using / have you used the NI software to communicate to the NXT? I think I am also a bit unclear exactly what is not working properly. I guess my biggest question is what type of software package are you using to communicate to the NXT?
- I use LabVIEW2009 student edition with the NXT modul (Toolkit) 2009.
Now I have a wait of 100ms after reading the mailbox in my VI.
When I use the following code I get now the String "2". It works now. But if I use the above code, I get now the string "... ³ HTC One SX (and still 3 strange characters)" and not the String "2". Why I get another String? Is anything wrong?
This works:
robotman2 wrote:I haven't looked too much into NI's software extension for the NXT, but in general NI software tends to use modules (VI's) that are custom written for their software and don't translate over to text-based programming too easily. An example of this might be the "mailbox" you mention. To my knowledge, the NXT does not have a mailbox and indeed may be NI lingo for handling received messages.
robotman2, You may want to research this a bit more before answering these types of question. The mailbox is a concept used in LEGO's firmware, NXT-G, NI's Labview, and even NXC.
freggel10, in your code, you seem to be sending the message AFTER the null termination. It seems like you'd want to send it as the message/data byte