Announcement

Collapse
No announcement yet.

UE4Duino - Arduino to UE4 plugin Release!

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

  • I have the same problem with the new plugin. Am I doing something wrong or are there still some problems wit hthe plugin and windows 10?

    Comment


    • Hey Grizly32 (or anyone),

      I got that example you put up for turning an LED on and off to work well, but I'm struggling to scale it up to a more complex level. I am trying to get the body rotations from the ATV out onto the Arduino to do some controlling. The Arduino appears to be reading the data fine, but it is not handling it in the code perhaps? The pictures attached have the blueprint and code. Any and all help is appreciated!

      - John

      Click image for larger version

Name:	Screen Shot 2015-11-18 at 12.46.44 PM.png
Views:	1
Size:	45.4 KB
ID:	1093513Click image for larger version

Name:	Screen Shot 2015-11-18 at 12.46.58 PM.png
Views:	1
Size:	30.8 KB
ID:	1093514Click image for larger version

Name:	Rotations.PNG
Views:	1
Size:	168.3 KB
ID:	1093515

      Comment


      • Hey John!

        On line 17 of your Arduino sketch I think it needs to be "!=" instead of "==".

        If that doesn't fix it let me know!
        http://www.fusionlabz.com

        Comment


        • Made that change after picking through how the code actually functioned. It's still not working. My most recent attempt I've tried beginning and ending the Serial Write string with a hat in order to clear the rotation variable before the usable string is concatenated. Any other ideas?

          - John

          Comment


          • The plugin for 4.9 also works on the 4.10.
            I'm able to use the Plugin only in editor mode. I get this error when trying to play a windows executable I’ve created
            Plugin ‘UE4Duino’ failed to load because module ‘UE4Duino’ could not be found. Please ensure the plugin is properly installed, otherwise consider disabling the plugin for this project.
            My project it's already a Code Project, and rebuilding the entire solution doesn't work for me. How to get this plugin work correctly?

            Comment


            • I can't get the 4.9 version working in 4.10 with Windows 10. Gives me a "needs to be recompiled for this version" error and UE4 fails to load.

              (Also, grizly, I sent you a related PM.)


              EDIT: I realized I initially took the wrong steps to install it, but I still can't get it working. Mystery unsolved, so far.
              Last edited by OuterSpacePlanets; 12-08-2015, 12:57 AM.

              Comment


              • I don't know if it would make a difference to the engine, but would recompiling the plugin in Visual Studio '15 make a difference now that the engine's native C++ support has been transitioned? Having similar re-install issues others after updating to 4.10.

                Comment


                • Hello,
                  I am very interested in doing some work with Arduino and UE4, but I am a beginner at this field.
                  Could you provide some example on how to read data from the Arduino and it's sensors?
                  Regards,
                  Kia.

                  Comment


                  • Does anyone have advice for how to get this working on Mac OS versions of UE4? Any help would be greatly appreciated. :-)

                    Comment


                    • Brilliant, John Michael!, apologies for not checking back sooner, only getting back to it now, answers my question perfectly, thank you kind sir!
                      Last edited by Moykul; 12-23-2015, 07:17 PM. Reason: expected in line reply

                      Comment


                      • crash

                        Hey all,

                        I managed to get a project up and running that uses animations via sockets to pass serial data to my Uno and then servos (Animatronics). Everything is great except after some time (longest up time 7 minutes) - UE4 crashes with the errors below.

                        Access violation - code c0000005 (first/second chance not available)

                        msvcr120
                        UE4Editor_UE4Duino!TArray<wchar_t,FDefaultAllocator>::CopyToEmpty<wchar_t,FDefaultAllocator>() [f:\epic games\4.9\engine\source\runtime\core\public\containers\array.h:2282]
                        UE4Editor_UE4Duino!UThreadBP::SendData() [c:\users\raghu\documents\arduinotest\arduinotest 4.9\plugins\ue4duino\source\ue4duino\private\threadbp.cpp:69]
                        UE4Editor_UE4Duino!ThreadTest::Run() [c:\users\raghu\documents\arduinotest\arduinotest 4.9\plugins\ue4duino\source\ue4duino\private\threadtest.cpp:68]
                        UE4Editor_Core!FRunnableThreadWin::Run() [d:\buildfarm\buildmachine_++depot+ue4-releases+4.9\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:74]


                        I didn't like the hard coding of c: drives and user name "raghu" so tracked down that to the debug .pdb file which was tossing up this error "CompiledInDefer_UClass_UThreadBP$initializer$B NeedsDestructor"

                        And in the mini dump file I get "msvcr120.dll!memcpy() Line 178 Unknown" in Call Stack - "The thread tried to read or write from a virtual address from which it does not have appropriate access."

                        I have recompiled the code inside of UE4 and setup VS2013. I see the source is included but can someone give me a short blow by blow how I rebuild the binary files(I've tried)? I get these errors using all versions of the plugin on both my Windows 7 and 10 machines. Does anyone already have this solved?

                        Thanks!
                        Indie Dev @http://www.numicus.com - Click to download Mac's Trophy Trout Video Game Demo

                        Comment


                        • Project share

                          Here is the animation system and UE4 driving behavior of my robot. Two servos are using socket rotation inside of blueprints via the serial arduino plugin. At around seven minutes I run into a stack resource problem but this video is only 15 seconds long.


                          Indie Dev @http://www.numicus.com - Click to download Mac's Trophy Trout Video Game Demo

                          Comment


                          • When will an update be coming for this to work with 4.10 and Windows 10?

                            I'm trying to get an LED to turn on by walking through a TriggerBox volume in version 4.9, but the Arduino doesn't seem to be reacting well to it. The RX light on the Arduino UNO lights up every time I enter and exit the volume, but my LED hooked up to pin 13 only lights up intermittently. The LED might light up on time, but then it will lag for a couple seconds before turning off after exiting the volume. I'll walk through the volume again, and then it won't light up, and then it will light up 2 seconds later, and then it will never turn off. I have to open the serial monitor for the LED to turn off. I'm using the code below:


                            void setup() {

                            Serial.begin(9600);

                            }

                            void loop() {

                            while (Serial.available() > 0)
                            {

                            if (Serial.readString() == "ON")
                            {
                            PORTB |= _BV(PB5);
                            }

                            if (Serial.readString() == "OFF")
                            {
                            PORTB &= ~_BV(PB5);
                            }
                            }

                            }

                            Click image for larger version

Name:	ue4duino.png
Views:	1
Size:	106.9 KB
ID:	1098302

                            I used PORTB |= _BV(PB5) and PORTB &= ~_BV(PB5) in replacement of digitalWrite since I thought that might remedy the latency problems that I'm experiencing, but that didn't fix anything either. I also tried changing USB ports to no avail.

                            Could anyone help me out with this or know what the problem might be?
                            Last edited by NCMcClure; 01-09-2016, 10:25 PM.

                            Comment


                            • Take a look at John Michael's post above. In his code he uses if(junk == '^') . Look at his blueprints - See how they have an append with that same '^' character? The idea is the loop is waiting for that character to show and then perform an action. Arduino will just blob the strings together without it. You sort of need to tell Arduino '^' "hey stop and read this - it is separate and important" i.e. (On) then ',' oh now stop and read (off). I tried to find the link I used searching for serial multiple servos. Plenty of examples In serial communication of how it works.

                              It looks like this -> " onoffonoffonoff " which is why it works sometimes but -> on^off,on^off,on^ works every time.

                              Hope that helps. You might also just want to call is serial port open node after event begin play too.
                              Indie Dev @http://www.numicus.com - Click to download Mac's Trophy Trout Video Game Demo

                              Comment


                              • Originally posted by valky82 View Post
                                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.
                                Do not know if it is still relevant, but I had the same problem under windows 7.
                                To avoid the respective error I added the "OpenSerial" and "CloseSerial" in GameMode blueprint, and I read the serial from the Character blueprint.

                                Comment

                                Working...
                                X