Home→Forums→MonoBrick Communication Library→Communicating between two nxt bricks
- This topic has 5 replies, 2 voices, and was last updated 12 years ago by
Chris Connor.
-
AuthorPosts
-
April 22, 2014 at 04:25 #4176

Chris ConnorParticipantHello,
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!
April 22, 2014 at 18:37 #4178
Anders SøborgKeymasterHi 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
April 22, 2014 at 20:28 #4179
Chris ConnorParticipantOh 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?
April 22, 2014 at 21:10 #4180
Chris ConnorParticipantActually 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.
April 23, 2014 at 18:15 #4181
Anders SøborgKeymasterHi 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
-
This reply was modified 12 years ago by
Anders Søborg.
April 23, 2014 at 19:37 #4183
Chris ConnorParticipantHmm 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!
-
This reply was modified 12 years ago by
-
AuthorPosts
You must be logged in to reply to this topic.

Follow