Using two different mailboxes, Bluetooth and NXT
Jay from Australia  [4 posts]
7 years
Hello Roborelm help forum,

I've built myself a self balancing robot with NXT and I've mounted an IP camera on it.  I'm trying to use TWO mailboxes to send two different driving commands via BT.  Ultimately, I want to tell my robot two pieces of information.

1. How far away an object is (using the CoG Box Size)
2. Which way to turn using CoG_X

I want to send the value of both of these variables to my robot using two different mailboxes.

To simulate this working, I've built a very basic RoboRelm program and NXC program containing only the BT communication (without a video feed) - but it works unexpectedly:

I can only get data from one mailbox and not the other.

I'm sending the number 8 to mailbox #1 and sending the number 20 to mailbox #2.  My program only shows number 8 and receives zero at mailbox #2.

Attached are my NXC and RoboRelm programs.

I've also tried putting some Timers in to make the program wait a while before reading the next mailbox in RoboRelm but they also don't seem to work...

Hoping someone can help me.



Jay from Australia  [4 posts] 7 years
Progress so far,

I have successfully communicated to my NXT using the NXC program attached in the initial post.  I'm pushing numbers to the NXT with a C# interface that I've just built.  It sends BT messages one after the other the different mailboxes (which is what I'm trying to achieve with RoboRelm without success).

Something tells me that RoboRelm may be clearing other mailbox buffers on my NXT when a message has been sent instead of just updating the mailbox in question.



Anonymous 7 years

We made a couple of tweaks that we think may be causing the issue. If you could download the latest and test again that would be appreciated. Also, if you could attach the robofile that you use in your experiments that would be helpful too.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index