How to connect Arduino with Lego Mindstorms

In order to connect Lego with the Arduino Yun, you can use the following diagrams.
You might want to play around with the voltage divider.
I just added it to the circuit and have not tested if the values of the resistors are right.

The Motor needs to connect to an H-Bridge. We found the SN754410 very useful. A good example for how to use an H-Bridge with the Arduino can be found here: http://itp.nyu.edu/physcomp/labs/motors-and-transistors/dc-motor-control-using-an-h-bridge/

The other simple sensors need a certain wiring but then they can be read just as an analog sensor (EOPD, Force), or a push button (Touch).

As you can see the Diagramms are from 2013. We used EV3 Motors, but all the Sensors are from a previous generation of Mindstorms or from https://www.hitechnic.com

The EV3 Sensors have a data bus implemented. It is more difficult to connect with them.

Hi, how you managed to control the servo motor EV3 ? You can send me to control the servo motor code?

Hi, @Mr.Waffles,
stay tuned. We will have some updates for you later this year.
For now, you will need to search LEGO in this forum and build your own Arduino adapter.

Yes, the easiest way to connect this Arduino up to the Lego Mindstorms NXT is to use the Breadboard adapter to the pin positions of SDA, SLC as well as the GND. To get further information you can also visit reliance electric motor.
Thanks.