Announcement

Collapse
No announcement yet.

UE4Duino - Arduino to UE4 plugin Release!

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

    I'm having some trouble getting serial data read. I'm using Windows 10 and UE4 4.9.

    I'm trying the test with the Serial.println(2); in the Arduino software but nothing prints in UE4. The serial monitor in Arduino shows data being printed.

    Here's what does work. UE4 recognizes and is able to read serial data it just won't return the values for me a print the string.


    This works but when I connect the READ SERIAL return value node to IN STRING on Print String I get nothing. The weird thing is that it seems like its printing data but that it's just blank. I know this because I printed a string on BeginPlay and it gets wiped off the string by blank data.

    Any guidance is appreciated.
    Attached Files

    Comment


      Hi,
      I Have the same problem with W10 et UE 4.9.2.
      With only the Open Serial and close Serial connected I have this log:

      With only the :LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//ThreadTest///Thread_7c0_0///####STATCAT_Advanced#### old //STATGROUP_Threads//ThreadTest///Thread_1a50_0///####STATCAT_Advanced####

      Thanks for your help.

      Comment


        Hey guys, sorry yet again for taking so long to reply on here. Things have calmed down a bit for me so I will be making a large effort to respond right away to questions from now on.

        @Jacapo - Maybe try adding some delays in your Arduino code?

        @John Michael - The Arduino reads in the strings from UE4 one character at a time...that might be where you are having trouble. I end all my UE4 "Write Serial" strings with a end-of-string character that I test for in the Arduino code. See the pics below for an example...hope that helps!

        Click image for larger version

Name:	Potentiometer_LED_Example_Blueprint.jpg
Views:	1
Size:	147.3 KB
ID:	1091369

        Click image for larger version

Name:	Potentiometer_LED_Example_Arduino.jpg
Views:	1
Size:	143.5 KB
ID:	1091370


        @Lozoo501, reedandrader, valky82 - Unfortunately I do not use Windows 10 at the moment so i can't really test for problems in that OS. I have read as well that Arduino has issues with that Windows version...
        http://www.fusionlabz.com

        Comment


          Hi.

          I am trying to control a servo using the servo-firmata

          can someone please write a little tutorial non how to use the nodes, a blinking light should suffice

          I am not sure what message to send to get the servo moving, i understand opening serial and close, but i am not sure how to write a message.

          Thank you!

          Comment


            I have just tested it with the Unity game engine and then it works fine, so i suppose something isn't right with the plugin code for windows 10.

            Comment


              @catalejo - Hi! I have a servo example ready to go and will get it done and uploaded to YouTube this evening.

              @Lozoo501 - Sorry you are having issues with the plugin in Windows 10...unfortunately I don't have Windows 10 installed yet to hunt down the problem. Once I get Win 10 installed I will let you know...
              http://www.fusionlabz.com

              Comment


                Thank you grisly32!!

                I did figure something but i am very curious on the arduino sketch

                you rock!

                Comment


                  @catalejo - Didn't get a chance to do a video, but here is a simple example of using UE4 to drive a servo attached to Arduino:

                  Here is the connections for the servo:

                  Click image for larger version

Name:	ServoConnections.jpg
Views:	1
Size:	43.0 KB
ID:	1091762

                  I started out with one of the Arduino servo sample sketches and changed it to this:

                  Click image for larger version

Name:	ServoArduino.jpg
Views:	1
Size:	101.1 KB
ID:	1091761

                  The read from UE4 happens in the 'while' loop.

                  The plugin reads the UE4 string in a character at a time so you need to add an "end" character to let the sketch know you are done with the string....in this example I use the '^' character to denote the end of the string.

                  The code concatenates the characters into a new string and when it reaches the end character it writes the value to the servo.

                  In UE4 I just made an Actor blueprint and added an arrow component to it:

                  Click image for larger version

Name:	ServoUE4.jpg
Views:	1
Size:	535.3 KB
ID:	1091763

                  Then I rotated the arrow and made it bounce back and forth between 5 and 175 degrees on the Z axis.

                  I sent the value of the Arrow's Z axis rotation, appended the '^' character to the end, and sent it out to the Arduino through the Write Serial node.

                  When I play in the editor the servo follows right along with the arrow's rotation.


                  Hope this helps a little and let me know if you have any questions!

                  -Tim
                  http://www.fusionlabz.com

                  Comment


                    grisly32! Thank you thank you thank you! will try tonight!

                    Comment


                      Windows 10 fix!

                      Hello ladies and gentlemen.

                      I've made for you the Windows 10 fix for UE4Duino. I hope you'll enjoy it.
                      Credits ofcourse to Fusionlabz for making the plugin.

                      Download link: https://drive.google.com/file/d/0B_E...ew?usp=sharing

                      Comment


                        @Skittluier - That's awesome! Thanks for the update!
                        http://www.fusionlabz.com

                        Comment


                          Thank you for awesome plugin!

                          I could quickly build arduino HW project by using this plugin but I confront problem packaging it.
                          When I tried to package the project it build well but does not execute. Just nothing happens when I double click the packaged .exe file.
                          I tried without the plugin. It builds well and execute well. So anybody have the similar problem or know why this happens?

                          Thanks in advance.

                          Comment


                            Hey ckyun777, I ran into the same exact problem. I am working on trying to fix it and will update when I find the problem.

                            Thanks!
                            http://www.fusionlabz.com

                            Comment


                              Nice! For some reason, there are no download links for 4.8.3........ Any chance of getting this back? I'd like to use this on an existing project for testing.

                              Comment


                                Hello,

                                For a project at my school I have to connect an Arduino with Unreal Engine. I want to use te output value of a potmeter in the control of Unreal Engine. To test this I made a simple program that has to print the value of the potmeter in Unreal Engine, just like the example in the beginning of this topic. However, the program doesn't worrk. I can see the value using the serialmonitor of the Arduino-program, but I don't see the value in Unreal. I hope someone can help me. I included a screenshot of the program in Unreal and the program for the Arduino.

                                Click image for larger version

Name:	Arduino.jpg
Views:	1
Size:	96.1 KB
ID:	1092969
                                Click image for larger version

Name:	Blueprint.jpg
Views:	1
Size:	147.4 KB
ID:	1092967
                                Attached Files

                                Comment

                                Working...
                                X