Search Unity

Communication with Lego Mindstorms

Discussion in 'VR' started by dichterDichter, Feb 7, 2017.

  1. dichterDichter

    dichterDichter

    Joined:
    Oct 8, 2015
    Posts:
    13
    Hi,

    im trying to connect my Unity application to a Mindstorms EV3. I found http://www.monobrick.dk/software/monobrick/ which offers two ways to communicate via wifi. One is to run a webserver on the Lego Brick whisch listens for example for calling http://IP/dothis/ and runs a specific command.
    This Version works but i would like to run the Native Lego Firmware and add the dll Version of MonoBrick to Unity.

    i have the free Version of Unity and would like to add the dll to my game.
    i placed it in the asset folder but i cannot call it by using "using MonoBrick.EV3" Do i have to add the DLL somewhere else?

    --> HoloLens Project
     
  2. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    Hello,

    Here is a link that will help setup using a dll in Unity.
    https://docs.unity3d.com/Manual/PluginInspector.html

    Quick version:

    You need to create a folder called Plugins in your project and move the dll into that folder in order to have unity see it. However if you want to have the plugin be used with a specific version or platform you need to create a folder inside the plugins folder. Then using the plugin Inspector, setup the plugin for the platform and version you want it to run in.

    upload_2017-2-7_10-22-24.png

    Let us know if you have questions

    Thank you,
    Wesley
     
  3. dichterDichter

    dichterDichter

    Joined:
    Oct 8, 2015
    Posts:
    13
    Thank you. In the Inspector, whick i did not find before you said, i found that the plugin is .Net 4 which is not compatible with unity i think. Or is there a trick to use .net 4? The Problem is that the reference is not found. When using the script somewhere else i have to include it using MonoBrick.EV3; but the reference is not found. i even tried the 5.6 beta where i can change api to .net 4.6. What could be wrong?
     
    Last edited: Feb 7, 2017
  4. Unity_Wesley

    Unity_Wesley

    Unity Technologies

    Joined:
    Sep 17, 2015
    Posts:
    558
    It sounds like you need two dll's, one for the editor to reference and one for build time. If you look above in the screen shot I have a WSA folder for runtime and a x86 folder for the editor to use.

    This screen shot might help set up a dll for the editor to use.
    upload_2017-2-8_13-13-0.png

    Let me know if this works for you,
     
  5. Game_Creator22

    Game_Creator22

    Joined:
    Apr 25, 2020
    Posts:
    1
    How can you connect EV3 to Unity? There's no tutorial on the net and I don't have the slightest idea. Please help.