Announcement

Collapse
No announcement yet.

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

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

    #46
    Originally posted by knotFF View Post
    So I think the problem I am having is because of an Apple<>Driver<>Windows for the USB ports
    I can't test it, but you are very likely correct.
    Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
    Unreal products: Dynamic Picture Frames, Neo Kinect

    Comment


      #47
      Originally posted by joeycampbell View Post
      I can print both readings on screen but the outputs from the split node are not working. Any ideas what I'm doing wrong?
      What are you splitting and trying to cast to Int?

      Anyway, I strongly suggest you walk away from String for this.
      Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
      Unreal products: Dynamic Picture Frames, Neo Kinect

      Comment


        #48
        Hi I'm trying to communicate with arduino from within a pawn blueprint.
        It seems to work based on the print strings I am using to troubleshoot where its going wrong...no errors in the blueprint but no signal happening in the arduino board.
        I have managed to get arduino working before in a non level blueprint (I used it before in the third person character blueprint) but in this pawn blueprint I am having no luck.
        Does something need to be changed in the pawn blueprint settings in order for it to send data to the arduino ?

        Comment


          #49
          Originally posted by _joey View Post
          Hi I'm trying to communicate with arduino from within a pawn blueprint.
          It seems to work based on the print strings I am using to troubleshoot where its going wrong...no errors in the blueprint but no signal happening in the arduino board.
          I have managed to get arduino working before in a non level blueprint (I used it before in the third person character blueprint) but in this pawn blueprint I am having no luck.
          Does something need to be changed in the pawn blueprint settings in order for it to send data to the arduino ?
          From what you explained, it seems that your success messages are being printed, but how do you know there's no signal on arduino? Are you controlling something and it's not being controlled correctly?
          Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
          Unreal products: Dynamic Picture Frames, Neo Kinect

          Comment


            #50
            Hi RVillani - yes I am using arduino to control a servo motor. The same arduino code has worked for me when I trigger the servo from the level blueprint or third person character blueprint but no luck using a pawn blueprint......no movement happens at all on the servo.

            Comment


              #51
              Hi - I couldn't fix the above issue so I brought my code back to the level blueprint instead of trying to interact with arduino via the pawn.
              I was wondering if anyone knows of a work around for trying to read from the arduino and write to it also from within Unreal.
              I am using the following code to enable the control a servo motor from within Unreal. The UE4Duino Print node sends an updated variable to the arduino serial and this value dictates the servo rotation. This all works fine but I would also like the ability to read from a sensor and bring this value into arduino.
              Unfortunately when I try to do this the sensor values conflict with the servo variable being sent from unreal.
              Is there a way to have two serial windows ? Or should I put a unique identity tag on my data being sent from Unreal so that the serial can decipher between sensor data and Unreal servo variables ?

              #include <Servo.h>
              Servo servo1;
              long num;

              void setup()
              {
              servo1.attach(2);
              Serial.setTimeout(50);
              Serial.begin(9600);
              }

              void loop()
              {
              while(Serial.available()>0)
              {
              num= Serial.parseInt();
              }
              servo1.write(num);
              delay(15);
              }

              Comment


                #52
                From further searching it seems as though this is a common issue wit arduino. A work around is done using SerialCallResponse or Hand Shaking.
                I've found an example done in processing - if anyone has an Unreal workaround please let me know:
                https://learn.sparkfun.com/tutorials...g-hands-part-2

                Comment


                  #53
                  4.19 binaries released! (click here)

                  _joey Hand Shaking and SerialCallResponse are protocols. They are surely helpful. I've done something like that before to keep several ints in sync between Unreal and Arduino. If you're willing to pay for some help, I do consulting through Skype. My nick is r_skull
                  Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                  Unreal products: Dynamic Picture Frames, Neo Kinect

                  Comment


                    #54
                    Hi,
                    Thanks for this plugin but I have an issue. It works perfectly in editor mode but when I package the game, it doesn't work. The port is avalaible, there's nothing connected except the arduino so I can't figure it why it doesn't work. Maybe you have some clue.

                    Comment


                      #55
                      Originally posted by Julien_L View Post
                      Hi,
                      Thanks for this plugin but I have an issue. It works perfectly in editor mode but when I package the game, it doesn't work. The port is avalaible, there's nothing connected except the arduino so I can't figure it why it doesn't work. Maybe you have some clue.
                      Are you using it inside an ActorComponent? I've had issues with Unreal not compiling plugins when I only use them in ActorComponents. Try referencing any of the plugin methods in the level blueprint or an Actor blueprint
                      Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                      Unreal products: Dynamic Picture Frames, Neo Kinect

                      Comment


                        #56
                        Hi RVillani
                        I'm trying to build my project and i get error CS0101 The namespace '<global namespace>' already contains a definition for 'UE4Duino"
                        The problematic file it states is UE4Duino.Build.cs(3,14)
                        Everything works perfectly in engine

                        What do i do?

                        Comment


                          #57
                          ODDYSYRocks Usually, when UE4 insists on that error, it's because of previously cached compiled files, with an existing somewhat different copy of the same plugin.

                          Delete project's Intermediate, Saved and Binaries folders, right click the project's .uproject file and choose Generate Visual Studio Project Files. Then see if it compiles. And also delete Intermediate and Binaries folders inside the UE4Duino plugin folder, before generating Visual Studio Project Files.
                          Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                          Unreal products: Dynamic Picture Frames, Neo Kinect

                          Comment


                            #58
                            Originally posted by RVillani View Post

                            Are you using it inside an ActorComponent? I've had issues with Unreal not compiling plugins when I only use them in ActorComponents. Try referencing any of the plugin methods in the level blueprint or an Actor blueprint
                            I tried but I've got the same problem. I tried with UE 18 and UE 16 but still. I've got "serial is not opened" even if it works perfectly in editor mode. I started with a blank project, I just had the plugin.

                            Comment


                              #59
                              Originally posted by Julien_L View Post

                              I tried but I've got the same problem. I tried with UE 18 and UE 16 but still. I've got "serial is not opened" even if it works perfectly in editor mode. I started with a blank project, I just had the plugin.
                              Open your project's .uproject file in a text editor and let me see the plugins part of it, please.
                              Freelancer Game Dev Generalist and Unreal Consultant | Portfolio
                              Unreal products: Dynamic Picture Frames, Neo Kinect

                              Comment


                                #60
                                Originally posted by RVillani View Post

                                Open your project's .uproject file in a text editor and let me see the plugins part of it, please.
                                Thanks, it works now. I followed your instructions on post #37. Thanks again for this great plugin.

                                Comment

                                Working...
                                X