Communicating between two nxt bricks

HomeForumsMonoBrick Communication LibraryCommunicating between two nxt bricks

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #4176
    Author Image
    Chris Connor
    Participant

    Hello,

    I am making a joystick using RCX rotation sensors and an NXT brick. The idea would be that the program would read the values from the rotation sensors and then send simple commands to a slave NXT brick which would be a simple wheeled robot. The commands would be very simple, as in just simple move forward, backward, turn left etc… I’m just curious, is it possible to communicate between bricks with the monobrick library? It doesn’t have to be very sophisticated, just like if certain conditions were met it would tell the other brick to turn on a motor or something like that. Any insight would be appreciated.

    Thanks!

    #4178
    Author Image
    Anders Søborg
    Keymaster

    Hi Chris

    Why do you want to use a PC as a “bridge” whenyou can make the NXT send a message to another NXT using Bluetooth?

    Anders

    #4179
    Author Image
    Chris Connor
    Participant

    Oh is it easier to do it that way? How would I do that? As in if I were to move the joystick forward, it would register the movement with the rotation sensor and then how would I get it to send a command to the other brick?

    #4180
    Author Image
    Chris Connor
    Participant

    Actually I was just thinking would it be possible to initialize two NXT bricks in the same code? That way it would be using the PC as a bridge. As in initializing two bricks like this

    Brick1 = new Brick<RCXRotationSensor, Sonar, RCXRotationSensor, Sensor>(“COM5”);
    Brick2 = new Brick<RCXRotationSensor, Sonar, RCXRotationSensor, Sensor>(“COM6”);

    Using two different com ports it should in theory work? Not sure if you have this implemented or not but it seems like it should work.

    #4181
    Author Image
    Anders Søborg
    Keymaster

    Hi Chris

    Using two different com ports it should in theory work?

    That should work – but why not communicate directly instead of using a PC as a bridge?

    Anders

    #4183
    Author Image
    Chris Connor
    Participant

    Hmm well I’m not sure how to communicate directly, but I managed to use the PC as a bridge and it works just fine for my purpose. Thanks for the help!

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Posted in

Make a donation