Announcement

Collapse
No announcement yet.

[Free][Windows only] UE4Duino 2 - Arduino (COM port) communication

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Originally posted by UnrealPinball View Post
    Hello!

    I'm very new with Unreal Engine and i saw this plugin and thought... "Hey! i could make a cool GUI scoring for my home pinball" but i don't know where to go from there haha. I have the game all coded in Arduino but for scoring (Arduino is doing the math for all 4 players) i want it to be displayed on Unreal Engine and maybe add pictures, how would i do this?

    Example, if target/switch is hit -> Add score on Arduino -> printing/displaying scoring in Unreal Engine.

    And for sharing data, how can i get Unreal Engine to talk to Arduino? Like In Unreal i want it to tell the Arduino to test lighting, coils and switches to see if they're working.

    Example, custom GUI menu/settings, click "Test Lighting" in Unreal Engine -> Arduino will turn on all lights.


    Thanks,
    I'm ultra busy 'til June, so I'll have to be brief.
    You'll send the commands from Arduino to Unreal using Serial.writeXXX methods. Te read them in Unreal using the Serial class, call the ReadXXX functions. To send stuff to Arduino, call the Print or Write methods. And, for working with more than a single variable simultaneously, search this thread for protocol.
    Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
    Unreal products: Dynamic Picture Frames, Neo Kinect

    Comment


      Originally posted by Lolboer99999999 View Post
      Hello Guys i'm a 17 year old noob trying to learn how to combine ue4 and arduino i managed to download the UE4duino plugin succesfullly but i can't get it to work.
      i tried to control the light intensity of a point light with a potentiometer and i kind of get it to work but i get a lot off random values because some values are split in two frames for example if i have the value 255 unreal reads it as 25 and 5. i simply can't solve it i have read the whole forum for a simple and clear answer but i can't find one i hoope you guys can help me
      ps: i'm using an arduino uno and UE4.21.2
      greetings Kenneth

      (Sorry for the bad english)
      Don't use strings to exchange numbers. You'd need some synchronization algorithm for that to work nicely. If your values are in bytes, just use Serial.writeByte to send it to Unreal and, in Unreal, call ReadByte from the Serial class to read them. And always call Flush after reading because Arduino will likely send data much faster than Unreal will be reading it.
      Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
      Unreal products: Dynamic Picture Frames, Neo Kinect

      Comment


        Is an amazing plug in for prototype interaction with unreal

        I'm having an issue with the version of the plug in for the version of unreal 4.22.2 I dont know if this is the best place for ask for help. or recomendations about my issues.
        please let me know if this is the best place for place my question and obtain help.

        In the past I used succesfully the plugin in version 4.19 but now I'm trying to open the old files or create new projects with the plug-in and the system shows me the following message:

        the following modules are missing or build with a different engine version :
        UE4Duino.

        and them the engine ask for rebuild and a new message appear that I need rebuild from the source manually.

        is the same problem if I try to create a new project an install the plug in in a old project.

        Is a way to update the plug-in that works with unreal version 4.22.2?

        thanks
        and thanks for keep this amazing plug in updated.

        Comment


          Hey huys, Can someone help me with my problem? I have difficulties to read a vector from the serial port of the ardiuno, I'm using a MPU-6050. I have no idea about how I can use that values.

          Comment


            Originally posted by pancleteria View Post
            Is an amazing plug in for prototype interaction with unreal

            I'm having an issue with the version of the plug in for the version of unreal 4.22.2 I dont know if this is the best place for ask for help. or recomendations about my issues.
            please let me know if this is the best place for place my question and obtain help.

            In the past I used succesfully the plugin in version 4.19 but now I'm trying to open the old files or create new projects with the plug-in and the system shows me the following message:

            the following modules are missing or build with a different engine version :
            UE4Duino.

            and them the engine ask for rebuild and a new message appear that I need rebuild from the source manually.

            is the same problem if I try to create a new project an install the plug in in a old project.

            Is a way to update the plug-in that works with unreal version 4.22.2?

            thanks
            and thanks for keep this amazing plug in updated.
            same problem here. Plugin don't work with 4.22.2 versions of unreal. any kind of help ?

            Comment


              Are you planing to update the plugin to Unreal version 4.22.2 any time soon?
              Everytime I try to lunch 4.22.2 with the plugin version 2.2.4 it is not working and I can't
              open the project.

              Comment


                Guys, I'm working abroad and I am very busy. I'll try to update it soon, but most likely I'll only do it when I'm back home, after the June 8th.
                If you have Visual Studio installed, you can get the source of the plugin, put it in the plugins folder and let the engine compile it for you.
                Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                Unreal products: Dynamic Picture Frames, Neo Kinect

                Comment


                  Originally posted by RVillani View Post

                  Don't use strings to exchange numbers. You'd need some synchronization algorithm for that to work nicely. If your values are in bytes, just use Serial.writeByte to send it to Unreal and, in Unreal, call ReadByte from the Serial class to read them. And always call Flush after reading because Arduino will likely send data much faster than Unreal will be reading it.
                  Thanks for the answer RVillani.
                  I managed to make it work with strings using a whileloop and some other stuff now i can even send stuff back to the arduino without lag i can also plug my arduino in any com port i want but if i pull it back out while running the game and i plug it back in it doesn´t work anymore so i hope someone has an idea to solve it, i tried with "is port open" but that doesn´t work at all
                  ps: LOVE UE4Duino and thanks for the effort

                  Comment


                    Hello, I try a very simple example but no success: (Arduino and ue4 communication is tested and works ok)

                    I want to press the Keyboard Z in Unreal - then it will turn the built-in Bulb of Arduino On. here is my code, any advice? thanks


                    Arduino code:

                    -------
                    long mydata = 0;


                    void setup() {
                    // initialize digital pin LED_BUILTIN as an output.
                    pinMode(LED_BUILTIN, OUTPUT);

                    }


                    void loop() {

                    while (Serial.available() == 0) {}
                    mydata = Serial.parseInt();
                    if (mydata==1) {

                    digitalWrite(LED_BUILTIN, HIGH); } // turn the LED on (HIGH is the voltage level)
                    // wait for a second
                    }

                    -------

                    UE4 Code :

                    Click image for larger version

Name:	Capture.JPG
Views:	3
Size:	364.1 KB
ID:	1630704
                    Attached Files
                    Last edited by VR class; 06-13-2019, 05:11 AM.

                    Comment


                      Hej hello. Everytime I update my engine version your plugin isnt working. Could you please solve that problem. Or be clear about the fact that that it works with 4.22 and not 4.22.1, 4.22.2, 4.22.3. Because then I wouldnt be updating in the first place. Just changing engine versions in the Uplugin file doesnt work. Tryed it several times.....
                      Last edited by game_master_jodan; 06-22-2019, 09:19 PM.

                      Comment


                        Originally posted by game_master_jodan View Post
                        Hej hello. Everytime I update my engine version your plugin isnt working. Could you please solve that problem. Or be clear about the fact that that it works with 4.22 and not 4.22.1, 4.22.2, 4.22.3. Because then I wouldnt be updating in the first place. Just changing engine versions in the Uplugin file doesnt work. Tryed it several times.....
                        Doesn't work how? Does it not open ports? Do you get an error message? Please, be specific so that I can try to help.
                        Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                        Unreal products: Dynamic Picture Frames, Neo Kinect

                        Comment


                          Originally posted by VR class View Post
                          Hello, I try a very simple example but no success: (Arduino and ue4 communication is tested and works ok)

                          I want to press the Keyboard Z in Unreal - then it will turn the built-in Bulb of Arduino On. here is my code, any advice? thanks
                          Everything looks correct to me. How did you confirm that Arduino and UE4 comms are working? What if you send back to Unreal the int that Arduino receives from Serial.parseInt() to check what it's getting?

                          Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                          Unreal products: Dynamic Picture Frames, Neo Kinect

                          Comment


                            Здраствуйте. Будет ли релиз под версию 4.22.3?

                            Comment


                              Originally posted by RVillani View Post

                              Doesn't work how? Does it not open ports? Do you get an error message? Please, be specific so that I can try to help.
                              Something like this: Plugin was made with different engine version, would you like to rebuild, port 3 could not be opened, try rebuilding from source, UE4.22.3 stops loading. It is/was always like that. Many projects are blueprint only and Thus..... No visual studio installed. If it was build with 4.22.3 instead of 4.22.0 my guess would be that the plugin would work. Anyway I have a lot of fun with your plugin!! VR worlds with wind and smell are great I will just stick with my 4.20 version.
                              Last edited by game_master_jodan; 06-30-2019, 06:22 PM.

                              Comment


                                Originally posted by game_master_jodan View Post
                                Something like this: Plugin was made with different engine version, would you like to rebuild.
                                I see. Unfortunately, that's one of the quirks of using code plugins in UE4. I can't do anything about it. The plugin is compiled against that specific UE4 version's dlls, so for each update, you need to rebuild the plugin. Sometimes (rarely) you also need to make code changes because of changes in the engine.

                                But as long as you have the source and VS installed, you can just click Yes when Unreal asks you to rebuild it. And if it complains about the version of the plugin, just delete the line that says the engine version in the .uplugin file for the plugin.

                                I strongly suggest you install VS, even if it's just for that. You might need it more times in the future. Install the 2019 Community version (free) following these guidelines and you'll be good to go.
                                Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                                Unreal products: Dynamic Picture Frames, Neo Kinect

                                Comment

                                Working...
                                X