NXTBee with RobotC

I’m coaching a Robofest team. We have successfully used the NXTBee in the past for multi-robot communication. However, we’re getting compile errors when trying to use the exact same code we’ve used successfully in the past. We are using RobotC version 4.5.2, which we downloaded last month. The problem involves the xBeeTools.h include; if I comment that out the error goes away (though we get a different error). The compile error is about an undefined variable (I think it was ‘maxSize’, though I’m posting from home and the computer we’re using is at school, so I cannot recreate it right now). IIRC, the ‘ReceiveMessage’ command was not recognized.

Is there an updated version of the xBeeTools somewhere? Is the NXTBee no longer supported (I notice that some of the pages for the NXTBee no longer exist)? Not sure if we need to use Bluetooth instead, though I’d much prefer to use the NXTBee!

Thanks,
Karen

Hey Karen,
I’m not sure, we haven’t tested these sensors on the latest RobotC. Let me see if I can get the attention of someone from Robomatter on this; it might be helpful to have the full error message though if you can get it. Even if you can take a screenshot with your phone, it would probably make it easier to debug.
Thanks! John

Thanks for your reply, John. The error message is:
Error:Undefined variable ‘maxSize’. ‘short’ assumed.
The line number given is 18.083, which I take to mean that it is inside the include (as there is no 18.083 in the program itself). ??

The receiveString command problem turned out to be a spelling error after I double checked it today, so the maxSize problem is the only one. I have another student who tried to compile a different program and got the same error. If we comment out the include, along with other related NXTBee references, the error goes away. We don’t have any ‘maxSize’ variable referenced directly in either program.

I’ve attached a screenshot of the RobotC window with the compile error.

If it turns out to be a problem with the latest RobotC, is there a way that I can roll the version back?

Thanks again,
Karen

We were trying to figure out where xBeeTools.h came from; can’t remember. Do you have a link to where you downloaded it from?

I recently migrated all our examples over to Github, there are a lot of RobotC examples up: https://github.com/DexterInd/DI_LEGO_NXT/tree/master/NXTBee

And there are two zip files of communications examples here:
https://github.com/DexterInd/DI_LEGO_NXT/blob/master/NXTBee/NXTBeeComplete.zip
https://github.com/DexterInd/DI_LEGO_NXT/blob/master/NXTBee/NXTBeeExamples.zip

Does any of this look useful or helpful?

Hi John,

I thought I replied to this a few days ago, but just came to give an update and can’t find the reply.

I’ve been using the xBeeTools.h for several years, and I’m not 100% sure where it came from, but it’s likely from this page:
http://www.robotc.net/firewiki/index.php/Main_Page
Under ‘Downloads’ there is a link for xBeeTools.h, though the link appears broken.

I have used the tutorials on that page (Multi-Robot Lessons) for several years, to introduce students to using the NXTBee. It’s nice because it’s fairly simple, as the students are usually learning about strings – how to format them, search them, parse them – at the same time that they’re learning the communication.

In looking over your links above, we may be able to use some of it, but it’s more complex and confusing than ideal. I’m working with three students, grades 8 to 11, with previous programming experience in Robolab, NXT-G, and EV3 graphical languages, who are fairly new to text based programming. I’m trying not to help ‘too much’ as a Robofest coach, but help enough for them to learn the programming that they need to.

If you look at the Multi-robot lessons at the link above, you’ll see that sending and receiving messages is fairly simple to code. I assume that the xBeeTools.h was doing the heavy lifting behind the scenes.

In looking over the links above there is an include file ‘di_crosstalk.h’. I assume we’d have to download and include that. There is also a lot of additional code, which looks complex for kids who are just figuring out strings and are a bit shaky on using boolean variables.

If you figure out how to make the xBeeTools.h file work, or if you have any other tips for us to get the communication working quickly (we have to video submit in the next week), I’d appreciate it!

Thanks,
Karen

How do you download a file from Github?

I need to get the di_crosstalk.h file to include, but I can’t figure out how to download. I can figure out how to copy something, but if I copy and paste it into RobotC it will no longer be a .h file (a driver?).

I can’t see anyway to just download it.

Thanks,
Karen

Sorry for the slow response here. First, I was mistaken about those two files NXTBeeComplete I believe is the old LVLM and NXT-G files. I don’t know if they work with the current software. Same for the NXTBeeExamples.

I think a lot of the older examples have been lost. I’ll try to find some more though.