Connect Apple iOS Device to LEGO MINDSTORMS EV3
This example shows how to connect an Apple iOS device to a LEGO® MINDSTROMS® EV3
Apple iOS devices provide wireless access and a user interface. LEGO MINDSTORMS EV3 is a programmable robotics construction set. The EV3 Brick is a programmable intelligent brick that acts as the brain of your robot, controls motors and sensors, and also provides wireless communication through Wi-Fi and Bluetooth. Using these two, you can, for example, control an EV3 robot using an iPhone, iPod or iPad by connecting them wirelessly.
This example provides two Simulink models,
In the iOS model, the value selected using the Slider is sent to the EV3. Data received from the EV3 is shown on the Apple iOS device screen.
In the EV3 model, data received from the Apple iOS device is displayed on the EV3 and used to control the status light. The press state of the Up button on the EV3 is sent to the Apple iOS device.
With these models, you will:
Set up a network connection between an Apple iOS device and an EV3.
Configure and run a Simulink model for Apple iOS device to send and receive TCP/IP packets from the EV3.
Configure and run a Simulink model for EV3 to receive and send TCP/IP packets to the Apple iOS device.
Complete the Getting Started with Apple iOS Devices example.(recommended)
Complete the Getting Started with LEGO MINDSTORMS EV3 Hardware example.(recommended)
iPhone, iPod or iPad
EV3 Wi-Fi Dongle
Task 1 - Configure Network Connection
Set up a network connection between an Apple iOS device and an EV3. The communication protocol used in this example is TCP/IP.
1. Connect your Apple iOS device to your Wi-Fi network.
2. Check Settings > Wi-Fi to find the IP address of your Apple iOS device.
3. Plug EV3 Wi-Fi Dongle into EV3 Host USB Port.
4. On the EV3 screen, navigate to Settings > Wi-Fi.
5. Enable Wi-Fi, and search and connect to the same Wi-Fi network to which Apple iOS device is connected.
6. Navigate to Settings > Brick Info. Find the IP address under IP address.
Task 2 - Configure and Run Models on Apple iOS Device and LEGO MINDSTORMS EV3
1. Open the iOS model.
2. Double-click the TCP/IP Send block and change the Remote address to the IP Address of the EV3 brick.
3. Open the LEGO MINDSTORMS EV3 model.
4. Double-click the TCP/IP Send block and change the Remote address to the IP address of the Apple iOS device.
5. In the iOS model, click Deploy to Hardware button of iOS model to run this model on your Apple iOS device.
6. In the EV3 model, click Deploy to Hardware to run this model on your EV3 hardware.
7. On the Apple iOS device, change the Slider value to control the status light on the EV3.
8. On the EV3 hardware, click the Up button. The state of the button displays on the Apple iOS device.
Other Things to Try
On the EV3 model, change the Button block to left, right, and center. Instead of the Slider block, use the Location block and try sending location data from the Apple iOS device to EV3.
Complete the Control LEGO MINDSTORMS EV3 Robot Using Apple iOS Device example.
This example showed you how to:
Wirelessly connect an Android smartphone to an EV3 using TCP/IP.
Remotely control the status light on the EV3 using the Android Slider block.