Answers.Body: <p>What you're describing is not (directly) possible, but you DO have some alternative options:  </p>
  
  <p>The standard solution is to use Bluetooth. Two NXTs can communicate with Bluetooth using the Lego software.  </p>
  
  <ol>
  <li>Pair the NXTs using the on-brick menus.  </li>
  <li>Write programs for both NXT 1 and NXT 2:  
  
  <ul>
  <li>At the start of the program, NXT 1 initiates a Bluetooth connection to NXT 2.  </li>
  <li>NXT 1 sends a message when it wants NXT 2 to do something; NXT 2 responds when it's finished.  </li>
  </ul></li>
  <li>Start both programs manually (in this setup, NXT 2 has to start first so it'll be ready when NXT1 connects).  </li>
  </ol>
  
  <p>If something less complex is acceptable, you can communicate using light sensors. Attach 2 light sensors facing directly into each other. One NXT can talk to the other by flashing the light on the sensor.  </p>
  
  <p>If you're open to alternative languages, LeJOS (Java for Mindstorms) gets you a lot closer to your goal. Through Bluetooth, NXT 1 can remotely start a program on NXT 2, or even access the motors and sensors. You can even communicate over high-speed RS485 by directly wiring two port 4's together, just like you said.  </p>
  
  <p>There used to be a 3rd-party NXT-G block for sending data over RS485. With it you could write programs for NXT 1 and NXT 2 like I described above, but with a direct wire between port 4's instead of Bluetooth. It would probably have lower latency than Bluetooth, but it's still not as direct as you would like.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-24T02:27:27.620Z
Answers.LastActivityDate: 2018-08-24T02:27:27.620Z
Answers.UserDisplayName: MindS1
Body: <p>Is it possible to connect two bricks using a cable (connecting port 4 to port 4) , and then have both programs run by only pressing one button? I want the sensors attached to one brick affect the motors that are attached to the other brick, if possible. I am only using NXT 2.1 programming if that helps. 
  Thanks ! </p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-08-24T07:30:39.023Z
Comments.Text: Certainly possible with EV3, but have my doubts about NXT
Comments.UserDisplayName: Michael Verschaeve
Tags: <mindstorms><nxt><bricks-and-pieces>
Title: Connecting 2 NXT bricks in order to control motors and sensors from one brick
UserDisplayName: user10582
ThreadText: # Connecting 2 NXT bricks in order to control motors and sensors from one brick
  
  (Asked by: username_0 on 2018-08-23)
  
  Is it possible to connect two bricks using a cable (connecting port 4 to port 4) , and then have both programs run by only pressing one button? I want the sensors attached to one brick affect the motors that are attached to the other brick, if possible. I am only using NXT 2.1 programming if that helps.
  Thanks !
  
  **Tags:** mindstorms, nxt, bricks-and-pieces
  > **Comments:**
  > **username_1**: Certainly possible with EV3, but have my doubts about NXT  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-08-24. Score: 2
  
  What you're describing is not (directly) possible, but you DO have some alternative options:
  
  The standard solution is to use Bluetooth. Two NXTs can communicate with Bluetooth using the Lego software.
  
  1. Pair the NXTs using the on-brick menus.
  2. Write programs for both NXT 1 and NXT 2:
     * At the start of the program, NXT 1 initiates a Bluetooth connection to NXT 2.
     * NXT 1 sends a message when it wants NXT 2 to do something; NXT 2 responds when it's finished.
  3. Start both programs manually (in this setup, NXT 2 has to start first so it'll be ready when NXT1 connects).
  
  If something less complex is acceptable, you can communicate using light sensors. Attach 2 light sensors facing directly into each other. One NXT can talk to the other by flashing the light on the sensor.
  
  If you're open to alternative languages, LeJOS (Java for Mindstorms) gets you a lot closer to your goal. Through Bluetooth, NXT 1 can remotely start a program on NXT 2, or even access the motors and sensors. You can even communicate over high-speed RS485 by directly wiring two port 4's together, just like you said.
  
  There used to be a 3rd-party NXT-G block for sending data over RS485. With it you could write programs for NXT 1 and NXT 2 like I described above, but with a direct wire between port 4's instead of Bluetooth. It would probably have lower latency than Bluetooth, but it's still not as direct as you would like.
  
  
  ---
  
  