Run Model on NXT Brick

This example shows how to configure and run a model on NXT brick.

Before starting this procedure, create or open a Simulink® model.

  1. Connect your NXT brick to the host computer using a USB cable or a Bluetooth® device. Simulink software uses this connection to download the model to the NXT hardware when you run the model.

    For more information about using a Bluetooth device, see Set Up A Bluetooth Connection.

  2. Use File > Save As to create a working copy of your model. Keep the original model as a backup copy.

  3. In your model, select Tools > Run on Target Hardware > Prepare to Run. This action changes the model Configuration Parameters.

  4. In the Run on Target Hardware pane that opens, set the Target hardware parameter to LEGO MINDSTORMS NXT.

  5. Set the Connection type parameter to USB connection or Bluetooth connection.

  6. Turn the NXT brick on by pressing the orange button. The LCD displays LEGO® and MINDSTORMS® splash screens, and then My Files.

      Note:   The NXT brick automatically powers down after several minutes of inactivity. If this happens, turn the power back on.

  7. Click the Deploy to Hardware button.

    This action automatically downloads and runs your model on the NXT brick.

    When the NXT hardware starts running the model, the LCD displays "I am running", or it displays the input values and labels of any LCD blocks in the model.

      Note:   To restart a model while it is running, press the left-arrow button on the NXT brick.

      To restart a model that is stopped, use the orange button on the NXT brick to select My Files > Software Files, and then select your model.

      To stop the model, press the grey button on the NXT brick.

Was this topic helpful?