Announcement

Collapse
No announcement yet.

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

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

    Hi, do you have any plans on updating the plugin for UE 4.20? I'm working on a music driven game where we're looking to construct our own instrument and connect it to Unreal using Arduino. We could use 4.17 but we'd prefer to have use of the Niagara editor in 4.20. Cheers!

    Comment


      I created Plugins folder inside Content folder of my project and dragged and dropped the UE4Duino foler, but it gave me a bunch of errors like,
      Unknown extension 'response', Unknown extension 'exp' etc. What am I doing wrong? Thanks.

      Comment


        UE 4.20.2 binaries released!
        DOWNLOAD

        Originally posted by Synergy192 View Post
        Hi, do you have any plans on updating the plugin for UE 4.20? I'm working on a music driven game where we're looking to construct our own instrument and connect it to Unreal using Arduino. We could use 4.17 but we'd prefer to have use of the Niagara editor in 4.20. Cheers!
        Originally posted by aselasandaruwan View Post
        I created Plugins folder inside Content folder of my project and dragged and dropped the UE4Duino foler, but it gave me a bunch of errors like,
        Unknown extension 'response', Unknown extension 'exp' etc. What am I doing wrong? Thanks.
        Hi, guys! I know it took me a bit to update it to 4.20, but for some reason I wasn't getting notified about messages in this thread.
        Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
        Unreal products: Dynamic Picture Frames, Neo Kinect

        Comment


          Hey RVillani, great plugin!
          We use it to send simple signals to different arduino devices and noticed that we have to delay between each print because otherwise they interfere with each other. Unfortunately the delay time doesn't seem to be very consistent. Is there a way to know when the signal is done sending so that we can send the next one? Thanks!

          Comment


            Originally posted by ODDYSYRocks View Post
            Hey RVillani, great plugin!
            We use it to send simple signals to different arduino devices and noticed that we have to delay between each print because otherwise they interfere with each other. Unfortunately the delay time doesn't seem to be very consistent. Is there a way to know when the signal is done sending so that we can send the next one? Thanks!
            There's a way, but you have to create it. It's a basic Serial communication. Very straight forward: send and receive data. There are no checks if the data was correctly sent etc. So, when I need precision, I create a protocol, like HTTP and others, that expect data in a specific format and, if it's not that way, requests again or wait for the next package.

            Here's an explanation of how I do this protocol.
            Last edited by RVillani; 09-06-2018, 02:56 PM. Reason: Grammar correction
            Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
            Unreal products: Dynamic Picture Frames, Neo Kinect

            Comment


              Originally posted by RVillani View Post
              UE 4.20.2 binaries released!
              DOWNLOAD





              Hi, guys! I know it took me a bit to update it to 4.20, but for some reason I wasn't getting notified about messages in this thread.
              Hi @RVillani Thanks, but even if I used the 4.20.2 version (I have updated UE to 4.20.2 as well), I still get following error,

              Click image for larger version  Name:	ArduinoError.png Views:	1 Size:	401.2 KB ID:	1524959

              Failed to import 'C:\UE4Duino_2.2.1_4.20.2\UE4Duino/Intermediate/Build/Win32/UE4/Development/UE4Duino/Module.UE4Duino.gen.cpp.obj'. Failed to create asset '/Game/Plugins/UE4Duino/Intermediate/Build/Win32/UE4/Development/UE4Duino/Module_UE4Duino_gen_cpp'.
              Please see Output Log for details.


              Failed to import 'C:\UE4Duino_2.2.1_4.20.2\UE4Duino/Intermediate/Build/Win64/UE4/Development/UE4Duino/Module.UE4Duino.cpp.obj'. Failed to create asset '/Game/Plugins/UE4Duino/Intermediate/Build/Win64/UE4/Development/UE4Duino/Module_UE4Duino_cpp'.
              Please see Output Log for details.

              Failed to import 'C:\UE4Duino_2.2.1_4.20.2\UE4Duino/Intermediate/Build/Win64/UE4/Development/UE4Duino/Module.UE4Duino.gen.cpp.obj'. Failed to create asset '/Game/Plugins/UE4Duino/Intermediate/Build/Win64/UE4/Development/UE4Duino/Module_UE4Duino_gen_cpp'.
              Please see Output Log for details.

              Do I have to install something else before the import? Thanks.

              Comment


                That path is not making sense to me. It looks like you are not extracting the plugin's contents into a Plugins folder.

                This is a plugin and, in Unreal, plugins go into a Plugins folder, inside your project folder. Try this:
                • Create a new project from the Launcher. Let's say you call it ArduinoTest.
                • After the project is created and opened once, close it and open its folder, where the .uproject file resides.
                • Create a new folder and name it Plugins.
                • Extract the zip content into the Plugins folder.
                • Launch the project again, go to Edit > Plugins, on the left scroll to Project Plugins and enable UE4Duino there. Then restart the project.
                With this structure, the Intermediate folder path should be something like ...\ArduinoTest\Plugins\UE4Duino\Intermediate.
                Last edited by RVillani; 09-08-2018, 03:31 PM. Reason: Added instructions on how to enable the plugin in the project
                Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                Unreal products: Dynamic Picture Frames, Neo Kinect

                Comment


                  Firstly thanks for such a great plugin it really is a big help. I have an issue that is most probably with my basic understanding of serial communication and would appreciate any help I can get.

                  I have a device that has two EMG sensors (channel 1 and 2) that provide a value. When I run it through a RealTerm terminal with baud rate 19200 and displaying uint8 where I get the correct results when idle
                  Click image for larger version

Name:	realterm-idle.png
Views:	107
Size:	94.3 KB
ID:	1527883

                  and when the sensor is given a signal I am given the correct value.
                  Click image for larger version

Name:	RealTermChannel1Full.png
Views:	106
Size:	83.1 KB
ID:	1527884

                  I used readbytes to get the data in Unreal but do not get the same data when idle
                  Click image for larger version

Name:	unrealReadbytesIdle.png
Views:	103
Size:	558.2 KB
ID:	1527885

                  or when it has a signal.
                  Click image for larger version

Name:	unrealReadbyteChannel1Full.png
Views:	100
Size:	577.3 KB
ID:	1527886

                  I am at a loss at what I am doing incorrectly, the blueprint is most likely incorrect. If I have made this post overly confusing I am happy to clarify anything.
                  Click image for larger version

Name:	Blueprint.png
Views:	78
Size:	76.9 KB
ID:	1527887

                  Comment


                    Hi - I'm trying to use this plug-in in 4.20.2.
                    I have activated the plug-in and I have the nodes to "activate port" I seem to only get "Port not Open".
                    I've tried Arduino on various Ports, baud rates, etc...Any thoughts for a newb thing I've skipped? Thanks! ---

                    FYI - I tested the plug-in 4.19.2 it works just fine...Anyone else having trouble with 4.20.2?
                    Last edited by SFoster07; 09-14-2018, 09:50 PM. Reason: Update:

                    Comment


                      Originally posted by Ivan.Phelan View Post
                      Firstly thanks for such a great plugin it really is a big help. I have an issue that is most probably with my basic understanding of serial communication and would appreciate any help I can get.
                      If you are just reading values, you don't need Print nor Delay. But I don't know what is the actual problem.. bytes should always be the same. They are the smallest unit of data you can transfer, so they can't be broken apart like floats and ints and have their values altered. I really don't know what's going on there yet. What is the function being used in the sensor to print the values?
                      Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                      Unreal products: Dynamic Picture Frames, Neo Kinect

                      Comment


                        Originally posted by Shauntezuma View Post
                        Hi - I'm trying to use this plug-in in 4.20.2.
                        I have activated the plug-in and I have the nodes to "activate port" I seem to only get "Port not Open".
                        I've tried Arduino on various Ports, baud rates, etc...Any thoughts for a newb thing I've skipped? Thanks! ---

                        FYI - I tested the plug-in 4.19.2 it works just fine...Anyone else having trouble with 4.20.2?
                        I'll be honest: I was in a hurry when I updated it and I just updated the coded and checked if it was packaging without errors. So I'll have to test it with my Arduino, but I don't see a reason why it shouldn't work, since the main part of the code is Windows code, not Unreal's, so no fatal changes were done there. Are you having the problem on a packaged version or in the editor?
                        Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                        Unreal products: Dynamic Picture Frames, Neo Kinect

                        Comment


                          Originally posted by RVillani View Post

                          If you are just reading values, you don't need Print nor Delay. But I don't know what is the actual problem.. bytes should always be the same. They are the smallest unit of data you can transfer, so they can't be broken apart like floats and ints and have their values altered. I really don't know what's going on there yet. What is the function being used in the sensor to print the values?
                          You are a legend, it works now. It was given different value when I was using print. Thanks for your help it was really appreciated. I am using it for a research project to help amputees learn how to use a prosthetic arm in VR. Here is a link with some more details if your interested https://www4.shu.ac.uk/mediacentre/g...ng-vr-research, thanks again.

                          Comment


                            Originally posted by RVillani View Post

                            I'll be honest: I was in a hurry when I updated it and I just updated the coded and checked if it was packaging without errors. So I'll have to test it with my Arduino, but I don't see a reason why it shouldn't work, since the main part of the code is Windows code, not Unreal's, so no fatal changes were done there. Are you having the problem on a packaged version or in the editor?
                            I was just trying output in the editor. Initially I tried the plug-in with my VR/mixed reality project...(4.20.2 it didn't work.) I created a clean FPS project (4.20.2) and tested it again. Didn't work. I thought the best way to test would be to backtrack...So I re-installed 4.19.2 and the previous plug-in version. It works fine in 4.19.2. I'm guessing 4.20.2 is not working (but I never rule out it's something I did and/or some other plug-in I have installed). I really appreciate you have this plugin! So great!
                            Last edited by SFoster07; 09-17-2018, 09:13 AM.

                            Comment


                              Originally posted by Ivan.Phelan View Post

                              You are a legend, it works now. It was given different value when I was using print. Thanks for your help it was really appreciated. I am using it for a research project to help amputees learn how to use a prosthetic arm in VR. Here is a link with some more details if your interested https://www4.shu.ac.uk/mediacentre/g...ng-vr-research, thanks again.
                              That's great, man!! Keep it up!
                              It's awesome when we are able to use something like a game engine to help humanity!
                              Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                              Unreal products: Dynamic Picture Frames, Neo Kinect

                              Comment


                                Originally posted by Shauntezuma View Post

                                I was just trying output in the editor. Initially I tried the plug-in with my VR/mixed reality project...(4.20.2 it didn't work.) I created a clean FPS project (4.20.2) and tested it again. Didn't work. I thought the best way to test would be to backtrack...So I re-installed 4.19.2 and the previous plug-in version. It works fine in 4.19.2. I'm guessing 4.20.2 is not working (but I never rule out it's something I did and/or some other plug-in I have installed). I really appreciate you have this plugin! So great!
                                I want to test it as soon as possible, but this week I'm on two tight deadlines, so it'll be really hard to focus on the plugin.
                                Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                                Unreal products: Dynamic Picture Frames, Neo Kinect

                                Comment

                                Working...
                                X