Complete NXT-G Blocks for NXTBee and RS485 Posted

Posted: July 16, 2011 in LEGO, News
Tags: , , , , ,

I have officially released completed blocks for both RS485 and the DI NXTBee. They are live now on the Files page! Some things to note with these blocks:

  • NXT-G is slower to execute and the LabVIEW VIs run faster.
  • All blocks have been tested with various inputs for each data type. They “should” work.
  • Due to a physical buffer limit, you can only send integers up to 1 byte (255) and text messages up to 128 bytes (127 characters).
  • Speed ranges may change should I get enough requests but these are the most common UART speeds (NXTBee ones are limited by the NXTBee and will not change).
  • If you have any questions, as always either email me or post below. WordPress requires me to moderate your first comment, but after that you are golden. Regardless, I get an email so I will respond!

Have fun!

  1. […] Andy has updated the NXTbee NXT-G blocks: they can now send strings, numbers, and boolean values.  They look great and can be downloaded here. […]

  2. Kean says:

    Hi Andy,

    Im Kean from Malaysia and I just got my hands on the NXTBee Pro a week ago and I have been playing around with it ever since.

    I have been trying to write a remote control car program using the NXT-G blocks made by you but I just can’t seem to make it work as expected no matter how I change and rewrite the program. For some reason, the block just behaved strangely when put inside a switch block.

    I would really appreciate it if you can provide me your email so i can send you my program for you to have a look at it. Thanks 🙂


  3. 08milluz says:


    I sent you an email.


  4. Andrew Kurtz says:

    I am trying to establish communications between a brick and my computer using an RS232-RS485 converter and I was wondering if you could share some more details on how the NXT-G RS485 block actually works. Specifically it would be helpful to know exactly how the block send and receives signals.

    • 08milluz says:

      The data is sent back in a unsigned bytes. All data sent from the brick will be converted to an unsigned 8 bit integer array. It doesnt matter if you send a string or not, it will convert to this datatype. One important note is that the block needs and ack. (just a byte to confirm receipt) It has been a few years since I wrote the code, but I think that is it. Give it a try and let me know if you have any problems.

      • Andrew Kurtz says:

        Thank you for your reply, I am still having trouble with my project. We hooked up an rs485 to Rs232 adapter and read the bytes out using processing sending an ack byte (0x02) on every receive of a byte but the NXT continues to send the same byte as if it hasnt received the ack
        Thanks again!

      • 08milluz says:

        Sorry for the slow reply. I am in the middle of FRC build season and have been spending a ton of time mentoring my team. I went back and looked at the code. It does not require an ack. (That was done in a special build I did for another project.) However, I do need to know what NXT firmware you’re using. If you to the standard FW, it runs at 1 Mbs. The baud rate can be changed if you used an enhanced firmware.

      • Andrew Kurtz says:

        We are using FW version 1.28

      • 08milluz says:

        Do you have it your system setup for 1 Mbs then?

      • Andrew Kurtz says:

        Since we last spoke I updated the firmware to the latest version and have succeeded in getting communication, sort of…
        I wrote a program using processing that simply sends a string over to the nxt, the nxt then reads this string and displays it on the LCD. This typically works properly the first time i send a message but then subsequent messages seem to overlap each other giving me a whole mess. I have been able to get two nxts to communicate successfully (sending and displaying strings without the same overlapping problem) and I have been trying to understand how the communication works by monitoring the rs485 line on the oscilloscope. It looks like there are 2 extra bytes sent besides the string itself. I’m guessing one is an initialization from the sender and the other is an acknowledgement from the receiver telling the sender its ok to send the string. Is this how it is set up? If not how does it work, more specifically what would I need to add to the code on the sending end? Also is there any way that I could see the source code for the block?
        Thank you for your time and best of luck to your FRC team this year!

      • 08milluz says:

        I will send you an email regarding this.

  5. Hi friend! does the rs485 block have any option like channels, like the bluetooth mailbox? thanks!

    • 08milluz says:

      No they do not. They work at a much lower level. There is very little firmware support, so in exposing the communications option, you have to do much of the work.

      • Thanks! I made a nxt-g program using the block, but it’s not working. Do you think that I can send it to you and you check it out and tell me what is wrong? I would really appreciate your help. Thank you!

      • 08milluz says:

        I dont have the bandwidth to review code, but I can tell you that one NXT must be listening when the other is sending. That limited FW support I spoke of means that you cant “check mail” as you might be used to.

  6. Ohh I get it! Thank you!

  7. […] Andy has updated the NXTbee NXT-G blocks: they can now send strings, numbers, and boolean values.  They look great and can be downloaded here. […]

Leave a Reply to Irvin Sánchez Cancel reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s