Controlling a LEGO MINDSTORMS NXT With an iPad or iPhone

Controlling a LEGO MINDSTORMS NXT With an iPad or iPhone

Now you can control your LEGO MINDSTORMS robot from any iPhone or iPad with Dexter Industries WIFI Module!  We have provided an example in RobotC for connecting your robot with step-by-step directions below on how to setup the connection.

  1. Connect your WIFI module to the internet.  Use our WPA or WEP examples to connect to the internet and establish an IP number.  You can find the NXT’s IP number by opening the Debug window in RobotC, after it has successfully connected to a WIFI network.
  2. Open the example file “DIWIFI-RobotControlSafari.c” in RobotC.  Compile the example onto your NXT and run it.
  3. Open the example webpage:  /websocket/RoboCont.html
  4. Enter the IP number of the NXT into the box on the webpage called “IP Number”

    Step 4: Enter the IP Number of the Robot

  5. Press the “Connect” button on the webpage.  You can watch the handshake process in your debug window.
  6. You should see “Connect” after a successful handshake connection in your debug stream.
  7. You are now free to send information to the NXT!

You can control forward, backward, turn and stop commands through the compass rose on the web page.  You can also tell the robot too beep from the web page.

The Compass for Controlling your robot: the arrows point the robot in the direction of the arrow, the red circle is Stop.

Important Links: