User Tag List

Page 1 of 10 123 ... LastLast
Results 1 to 40 of 376

Thread: UE4Duino - Arduino to UE4 plugin Release!

  1. #1
    4

    UE4Duino - Arduino to UE4 plugin Release!

    [6th UPDATE! 4.10 Compatible! 1/25/16]

    Updated to UE4 4.10! Click link below to download!

    http://www.fusionlabz.com/downloads/UE4Duino_4_10.zip


    --------------------------------------------------------------------------------------------------------

    [5th UPDATE! 4.9 Compatible! 9/22/15]

    Big thanks out to Providence94 for updating the plugin to 4.9!!

    Click on his link below to download!

    https://drive.google.com/file/d/0B7hqDvPVJ_50X2ZYUlZnVkhnZGs/view


    WINDOWS 10 USERS! Use the link below!

    Thanks out to Gidi2go and Skittluier for updating plugin to Windows 10!!

    https://drive.google.com/file/d/0B5YmlRw-1rCrM0dfRXRzVG13dDg/view


    --------------------------------------------------------------------------------------------------------

    [4th UPDATE! 4.8.2 Compatible! 7/22/15]

    Just updated the download link. Plugin now compatible with engine version 4.8.2.

    Enjoy!

    Just use the download link below!

    --------------------------------------------------------------------------------------------------------


    [3rd UPDATE! SOURCE RELEASED! 6/10/15]

    Just updated the download link. Download now includes the source files for the plugin.

    Enjoy!

    Just use the download link below!

    --------------------------------------------------------------------------------------------------------


    [2nd UPDATE! 5/10/15]

    Just updated the plugin again.

    There was an issue with the string return of 'Read Serial' having some extra characters (null, return, newline, etc...) so that an string 'equals' node wouldn't work as expected.

    It is now fixed and those pesky extra characters removed.

    Thanks out to Tesla Dev for finding that bug and letting me know!

    Just use the download link below and replace if you have already downloaded.

    --------------------------------------------------------------------------------------------------------

    [UPDATED]
    Just updated the plugin and added a some debugging info. Now you should see info in the Output Log as to if the Thread has started/stopped and Serial Port has opened/closed.

    I also added a new Blueprint node that returns true if the Serial Port opened correctly.

    Just use the download link below and replace if you have already downloaded.

    -----------------------------------------------------------------------------------------------------------

    Hi all,

    I have been wanting to use my Arduino in conjunction with UE4 for a while now and have finally managed to figure it out.

    Here are a couple of vids:

    https://www.youtube.com/watch?v=hhVILt6duXE

    https://www.youtube.com/watch?v=rzh9wh_SfDs

    I made a plugin from it and just wanted to share with whoever might want to use it.

    To download, click this link:
    http://www.fusionlabz.com/downloads/UE4Duino_Plugin.zip

    To use the plugin just drop the "Plugins" folder from the zip into your main project folder.

    Be sure that the plugin is activated in 'Windows->Plugins"
    Name:  PluginWindow.jpg
Views: 24302
Size:  103.0 KB

    I created Blueprint nodes to access the Arduino. You can find them by right clicking in a Blueprint and scrolling down to 'UE4Duino'.

    The four nodes are:
    • Open Serial
    • Close Serial
    • Read Serial
    • Write Serial


    Here is an example:
    Name:  UE4DuinoBlueprint.jpg
Views: 23956
Size:  123.4 KB

    *Be sure to use 'Close Serial' at some point in your project before or at 'End Play' node is fired off so that the serial port and thread are closed.

    I plan on submitting an example scene soon for the Marketplace that will have some tutorials and examples...

    Enjoy and please let me know if you have any issues/questions/comments...thanks!
    Attached Images Attached Images  
    Last edited by grizly32; 01-25-2016 at 10:43 AM. Reason: Update

  2. #2
    0
    Oh this is awesome. I've been wanting to add some fans into a VR experience. This should be a huge aid.

  3. #3
    0
    Infiltrator
    Join Date
    Jan 2015
    Posts
    12
    Holy Nutballs !!! this is amazing, cant wait to start messing around with it, thank you so much !!

  4. #4
    0
    UE Community Manager
    Join Date
    Jul 2014
    Posts
    1,330
    Welp, guess Alexander and myself are going to be stopping work on our Arduino integration pet projects, haha

    Awesome work!
    Last edited by Chance Ivey; 05-01-2015 at 09:56 PM.
    Twitter [@iveytron + @UnrealEngine] YouTube [/unrealengine] Twitch [/unrealengine]

  5. #5
    0
    UE Community Manager
    Join Date
    Mar 2014
    Posts
    2,132
    You just saved us a lot of time. Thanks a ton!

  6. #6
    0
    Samaritan
    Join Date
    Jul 2014
    Posts
    108
    This is awesome! Gonna mess around with this for sure.

  7. #7
    0
    Great work thanks for this, should save me a fair bit of time.

  8. #8
    0
    Seem to be having a few issues here.

    Just trying to run some tests with a serial read and/or write but not getting any results back.

    In my serial monitor I am getting a readout (Just have the basic DigitalReadSerial example running).

    There doesn't seem to be any way to tell if the open serial is actually working or not. Perhaps a success node on it would be handy?

  9. #9
    0
    Ok so that was just me being silly and attempting to have 2 things accessing the same serial port at once, so now I have managed the write side of things but I don't seem to be able to get anything back through the Read Serial. I am assuming I am just doing the wrong thing in the arduino side of things, should I be doing a Serial.write(xx) or Serial.print(xx) or something different entirely?

    Thanks.

  10. #10
    0
    Very nice plugin! Seams that I need to wipe the dust from my Ardunio once again

  11. #11
    0
    Thanks all!

    @ZoltanJr - You need to use Serial.println() because the code looks for the '\n' character to know when the data segment ends. I am working on a quickstart tutorial now and hopefully will have it posted

  12. #12
    0
    Supporter
    Join Date
    Mar 2015
    Posts
    3
    Hi grizly32. This is great! Thanks so much for sharing your work! Would it be possible to add a 'serial event' node?

    Best,

    Wimmm

  13. #13
    0
    Hello grizly32!

    Plug-ins that you have developed is very great.
    I was able to use a plug-in very easily.
    https://www.youtube.com/watch?v=j9smnjI-1-A

    Thanks!

    Translated into English from Japanese

  14. #14
    0
    Great! I love Arduino and i'm very happy to try this plugin, thank!

  15. #15
    0
    Quote Originally Posted by grizly32 View Post
    Thanks all!

    @ZoltanJr - You need to use Serial.println() because the code looks for the '\n' character to know when the data segment ends. I am working on a quickstart tutorial now and hopefully will have it posted
    Thanks grizly. I was using that but still don't seem to be able to get anything back with the read when I do a Serial.pintln() from an event on the arduino using :
    Serial.println(2);
    Serial.println('2');
    Serial.println("2");

    I just have the read hooked up on the tick event to a print string so I was under the impression it should also show the write events coming from Unreal itself too?

    Im using a Leonardo for this too if that makes any difference since I know it's got a slightly different serial setup to other boards but it should all still run over serial rather than serial1 im pretty sure,

    Thanks.

  16. #16
    0
    Wow, this looks great! Is there a build of the plugin for MacOS right now? Or only Win64?

  17. #17
    0
    UE Community Manager
    Join Date
    Mar 2014
    Posts
    2,132
    Just got a flex resistor running with it. Now to build my own VR glove! Have you posted schematics for yours from the video? I'm trying to build a glove for finger position tracking and then use the Leap Motion for hand location.
    Twitch /unrealalexander| Twitter @UnrealAlexander
    How to report a bug? | Installation & Setup issues?
    Call me to a thread by posting this: [MENTION]Alexander Paschall[/MENTION]

  18. #18
    0
    Just wanted to let you all know that I released an update to the plugin....please see the top post for details.


    Quote Originally Posted by wimmm View Post
    Hi grizly32. This is great! Thanks so much for sharing your work! Would it be possible to add a 'serial event' node?

    Best,

    Wimmm
    Thanks Wimmm! Could you elaborate on what you mean by 'Serial Event'?


    Quote Originally Posted by HAY2999 View Post
    Hello grizly32!

    Plug-ins that you have developed is very great.
    I was able to use a plug-in very easily.
    https://www.youtube.com/watch?v=j9smnjI-1-A

    Thanks!

    Translated into English from Japanese
    That's awesome! Glad you like it!


    Quote Originally Posted by nickadoo View Post
    Wow, this looks great! Is there a build of the plugin for MacOS right now? Or only Win64?
    Right now it's only for Win64 but I will see if I can port it over to MacOS this weekend.


    Quote Originally Posted by Alexander Paschall View Post
    Just got a flex resistor running with it. Now to build my own VR glove! Have you posted schematics for yours from the video? I'm trying to build a glove for finger position tracking and then use the Leap Motion for hand location.
    Hey Alexander! I can get a schematic together and post it up. Leap Motion is a good idea! I was trying to use a Hydra Razer controller strapped to my forearm for position data...it was working ok but a bit on the wonky side lol...


    Quote Originally Posted by ZoltanJr View Post
    Thanks grizly. I was using that but still don't seem to be able to get anything back with the read when I do a Serial.pintln() from an event on the arduino using :
    Serial.println(2);
    Serial.println('2');
    Serial.println("2");

    I just have the read hooked up on the tick event to a print string so I was under the impression it should also show the write events coming from Unreal itself too?

    Im using a Leonardo for this too if that makes any difference since I know it's got a slightly different serial setup to other boards but it should all still run over serial rather than serial1 im pretty sure,

    Thanks.
    Hey ZoltanJr! Sorry you are still having troubles. I have never used a Leonardo but I would think it would work fine with this.

    I made a simple example just printing out the number two...here are the sketch and blueprint:

    Name:  SketchTest.jpg
Views: 23057
Size:  67.5 KB

    Name:  BlueprintTest.jpg
Views: 23115
Size:  82.0 KB

    Also, be sure that your Serial Monitor from your Arduino window is closed before playing your UE4 scene. Hope that helps, but if not let me know!

    -Tim

  19. #19
    0
    Awesome, thank you!

  20. #20
    0
    Elite
    Join Date
    Mar 2015
    Posts
    1,167
    Now where did that bloody thing go?! The minute something cool happens to my arduino, I can't find it!
    Favorite Quotes:
    "History is indeed little more than the register of the crimes, follies and misfortunes of mankind." -Edward Gibbon
    "Whoever does not miss the Soviet Union has no heart. Whoever wants it back has no brain." -Vladimir Putin
    "No good decision was ever made in a swivel chair." -General George S. Patton.

  21. #21
    0
    Supporter
    Join Date
    Mar 2015
    Posts
    3
    Hi Grizly,

    I'm currently working on a project for which I use the input of five encoders via arduino to control the camera in unreal. Because I don't don't know cpp, I made a small app in Processing that reads the values from arduino and sends the data as osc messages to a port. I use monsieurgustav's unreal-osc plugin to read in the values in unreal (https://forums.unrealengine.com/showthread.php?49627-Plugin-OSC-for-UE4). It would of course be handier to read the values straight from the arduino into unreal.

    The way I read the values in processing at the moment is via a command that only reacts when there is something to be read at the serialport. It is not continuously reading the port, but only when there is a new value in the buffer. The osc plugin for unreal works similarly. An event is triggered when there is a message in the buffer to be read. The advantage of this is that I often have multiple messages from the different encoders that arrive very quickly one after the other. With the approach of reading the port with a tick event, it happens that I miss messages coming from the arduino because the tick works on every rendered frame and more data might have passed at the moment that is left unread.

    Is it clear how I described it? Or i made it more confusing

    Best,

    wim

  22. #22
    0
    When I try to launch or package my test game with this plugin, I get a black screen telling me that the UE4duino plugin is missing. It does show in my Windows>Plugins as being installed and enabled, is there something I am missing to have a plugin be packaged into a game? Thanks!

    Edit:Name:  Capture1.PNG
Views: 22741
Size:  6.1 KB
    Name:  Capture2.PNG
Views: 22783
Size:  80.3 KB
    Last edited by nickadoo; 05-05-2015 at 09:08 PM.

  23. #23
    0
    Still having issues, possibly a windows 10 problem though.

    With the Leonardo I am able to get the writes from Unreal to work fine, but read's return nothing.
    With a Uno or Mega I can't communicate either way, but they both work fine with the serial display in the arduino programmer.
    Trying to fix the driver for my Duemilanove and windows just BSOD on me so that 1s a bit interesting.
    Going to give my Due a go at the moment which requires me to update the arduino software anyway so maybe that will relieve some headaches.

  24. #24
    0
    Yep still the same deal. Only board that I can actually get to open the serial port connection with is the Leonardo but I can't get a read serial working with it even though just through the serial monitor I see everything working as expected.

    What OS and boards are other guys using that have managed to get this to work correctly?

  25. #25
    0
    @nickadoo - I think you may have put the plugin folder in the wrong place. From your pic it looks like you put it in your engine folder, but it needs to go into your project folder...the plugin should show up under "Installed" at the bottom of the Plugin Window list. Let me know if that helps!


    @ZoltanJr - Hmmmm...not sure what the problem is, especially since you can write from Unreal to the Arduino but not read. Could be Windows 10. I am using Windows 7 x64 and the Arduino UNO R3...do you have a Win 7 or Win 8 system available to test it on?

  26. #26
    0
    Quote Originally Posted by grizly32 View Post
    @ZoltanJr - Hmmmm...not sure what the problem is, especially since you can write from Unreal to the Arduino but not read. Could be Windows 10. I am using Windows 7 x64 and the Arduino UNO R3...do you have a Win 7 or Win 8 system available to test it on?
    Yeah it's got me pretty stumped too. Definitely seems like it must be something odd going on with windows 10 since nobody else is reporting any issues with it.I will take some home with me over the weekend and give them a go on windows 8. Thanks for the update you did with being able to see if the connection has worked or not, at least narrows it down on the other boards, can't quite see why the Leonardo writes but doesn't read though. If I'm doing a read on tick then any write that I do in unreal should show up in the read correct?

  27. #27
    0
    Oh also I don't see anything in the log with any of the boards but I can get a success on connection with the leonardo, not sure if that's any indicator as to what the problem might be.

  28. #28
    0
    Quote Originally Posted by grizly32 View Post
    @nickadoo - I think you may have put the plugin folder in the wrong place. From your pic it looks like you put it in your engine folder, but it needs to go into your project folder...the plugin should show up under "Installed" at the bottom of the Plugin Window list. Let me know if that helps!
    Thanks grizly32, I've tried both locations- and I receive the error each time. I looked around and a few sites said that you need to make your project a C++ project to have plugins get packaged. I installed Visual Studio and tried to do "add code to my project", but still receive the module missing error. I'm on Windows 8 x64 if that helps!

    Edit: I noticed that the "Port Opened/Closed" messages appear in the log if I hit play in the viewport. Still receiving the module missing error upon launch/packaging however.
    Last edited by nickadoo; 05-06-2015 at 11:28 PM.

  29. #29
    0
    Yes, the read on tick should show up. That example I showed a few posts up outputs a constant stream of "2"s to the screen.

    You don't get any notifications at all in the log? Not even anything saying that the port is not opened? If so then it seems like the plugin isn't starting up at all. For example, if I start a scene with a blueprint that has just the 'Open Serial' node at 'Event Begin Play' and the 'Close Serial' at 'Event End Play' and don't even hook the Arduino up I get a "ERROR: SERIAL PORT NOT OPENED!!" warning in the Output Log. That is strange that you don't get any messages at all. Let me know how it goes on Windows 8!

  30. #30
    0
    Just came across this project, while i happen to recieve my Arduino Mega in the mail today! Too bad i have no time to test out this awesomely goodness called UE4Duino ^^

  31. #31
    0
    Quote Originally Posted by grizly32 View Post
    Yes, the read on tick should show up. That example I showed a few posts up outputs a constant stream of "2"s to the screen.

    You don't get any notifications at all in the log? Not even anything saying that the port is not opened? If so then it seems like the plugin isn't starting up at all. For example, if I start a scene with a blueprint that has just the 'Open Serial' node at 'Event Begin Play' and the 'Close Serial' at 'Event End Play' and don't even hook the Arduino up I get a "ERROR: SERIAL PORT NOT OPENED!!" warning in the Output Log. That is strange that you don't get any messages at all. Let me know how it goes on Windows 8!
    Ok yep I get those notifications. I had the message log up not the **** output log! And I still definitely connect with the Leonardo, but it's the only board which gets a success on opening the serial port for whatever reason. Trying to do some research into windows 10 issues with arduino, I have had driver problems with pretty much every board being automatically detected and had to manually do them, all except for the Uno oddly enough. I couldn't get my 3D printer to connect at all, would just BSOD every time I tried to do anything with the drivers. So not sure if those drivers still aren't co-operating or require something different. But with the serial monitor in arduino I can send serial commands without any problems.

    Hopefully on my windows 8 machine it all works fine, but I hate having a problem that I can't figure out any way to beat hah. Maybe your DLL needs to be compiled on a windows 10 machine or something and grab some extra library? Or maybe security settings are blocking other programs from sending outgoing signals over serial perhaps? I will keep ******** around but if anybody has any thoughts would be great to hear them.

  32. #32
    0
    Quote Originally Posted by wimmm View Post
    Hi Grizly,

    I'm currently working on a project for which I use the input of five encoders via arduino to control the camera in unreal. Because I don't don't know cpp, I made a small app in Processing that reads the values from arduino and sends the data as osc messages to a port. I use monsieurgustav's unreal-osc plugin to read in the values in unreal (https://forums.unrealengine.com/showthread.php?49627-Plugin-OSC-for-UE4). It would of course be handier to read the values straight from the arduino into unreal.

    The way I read the values in processing at the moment is via a command that only reacts when there is something to be read at the serialport. It is not continuously reading the port, but only when there is a new value in the buffer. The osc plugin for unreal works similarly. An event is triggered when there is a message in the buffer to be read. The advantage of this is that I often have multiple messages from the different encoders that arrive very quickly one after the other. With the approach of reading the port with a tick event, it happens that I miss messages coming from the arduino because the tick works on every rendered frame and more data might have passed at the moment that is left unread.

    Is it clear how I described it? Or i made it more confusing

    Best,

    wim

    Hey wim,

    I see what you are saying now...that's a good point! I will look into adding a serial event or something similar so data isn't missed.

    Thanks!
    -Tim

  33. #33
    0
    Just wanted to let you all know that I released another update to the plugin....please see the top post for details.

  34. #34
    0
    Cool, I have tested it on a Arduino Mega R3 2560 on Win7 64bit. And it worked straight away. That is, reading a simple printIn() from Arduino --> UE4. And some simple buttons that change the printIn().
    So far, I have not been able to send data back to the Arduino but I'm most likely doing something wrong. Trying to light a LED on port 13 when a Box was hit by a projectile. Anyway, thanks for this super cool plugin.

  35. #35
    0
    Supporter
    Join Date
    Oct 2014
    Posts
    9
    Hi, I have problems with getting serial connection to work reliably.
    Here is the log message:
    Code:
    LogTemp: THREAD STARTED!!
    LogTemp:Warning: ERROR: SERIAL PORT NOT OPENED!!
    LogBlueprintUserMessages: Serial open!
    LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//ThreadTest///Thread_a90_0///////STATCAT_Advanced//// old //STATGROUP_Threads//ThreadTest///Thread_594_0///////STATCAT_Advanced////
    Basically sometimes i can connect, sometimes not. When I am connected sometimes I can read serial, sometimes I cant.

    What can be the reason of such erratic behaviour?
    Tested on UnoR3, Nano and Mega2560.

  36. #36
    0
    Quote Originally Posted by stressless View Post
    Cool, I have tested it on a Arduino Mega R3 2560 on Win7 64bit. And it worked straight away. That is, reading a simple printIn() from Arduino --> UE4. And some simple buttons that change the printIn().
    So far, I have not been able to send data back to the Arduino but I'm most likely doing something wrong. Trying to light a LED on port 13 when a Box was hit by a projectile. Anyway, thanks for this super cool plugin.
    Hey stressless! Glad you like the plugin!

    Are you still having trouble with sending back to Arduino? If so, let me know and post your blueprint and Arduino sketch and I'll try to help!
    -Tim


    Quote Originally Posted by 7hny View Post
    Hi, I have problems with getting serial connection to work reliably.
    Here is the log message:
    Code:
    LogTemp: THREAD STARTED!!
    LogTemp:Warning: ERROR: SERIAL PORT NOT OPENED!!
    LogBlueprintUserMessages: Serial open!
    LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//ThreadTest///Thread_a90_0///////STATCAT_Advanced//// old //STATGROUP_Threads//ThreadTest///Thread_594_0///////STATCAT_Advanced////
    Basically sometimes i can connect, sometimes not. When I am connected sometimes I can read serial, sometimes I cant.

    What can be the reason of such erratic behaviour?
    Tested on UnoR3, Nano and Mega2560.
    Hey 7hny!

    Sorry you are having problems!

    A lot of times is that if the serial port connects once and not the next time is that the port didn't close properly or it is open somewhere else.

    Be sure that the Arduino Serial Monitor is closed before running your UE4 level and also be sure to use the Close Serial node in your blueprint.

    Hope that helps, but if not please post your blueprint and Arduino sketch and I will try to help you out further,

    Thanks!
    -Tim

  37. #37
    0
    Supporter
    Join Date
    Oct 2014
    Posts
    9
    Quote Originally Posted by grizly32 View Post
    Hey 7hny!

    Sorry you are having problems!

    A lot of times is that if the serial port connects once and not the next time is that the port didn't close properly or it is open somewhere else.

    Be sure that the Arduino Serial Monitor is closed before running your UE4 level and also be sure to use the Close Serial node in your blueprint.

    Hope that helps, but if not please post your blueprint and Arduino sketch and I will try to help you out further,

    Thanks!
    -Tim
    Hi Tim!

    Thank you for the reply. Connection issues aside (they are managable), I have problems with established connection, perhaps you can guide me how to mitigate them. I am on Win 8.1.

    Close Serial is not working, after i open serial and close it, Is Serial Port Open returns true in the next session, despite log saying it was closed. When I print output of the serial (after closing it) it hangs to the last value.
    Code:
    LogTemp: THREAD CLOSED!!
    LogTemp: SERIAL PORT CLOSED!!
    I have no serial monitors connected etc. I tried various sketches, all of them works properly in other serial monitors.

    Besides that, I'm not sure if/how can I do something like serial.available() with this plugin?

    I was wondering if you could you share the source for this plugin?

    Thanks,
    7hny
    Last edited by 7hny; 05-18-2015 at 07:01 AM.

  38. #38
    0
    This is a cool plugin! Thanks for building it. What I'm trying to do is rather uncomplicated, I have attached a Heart Rate monitor to my arduino and it serialprints the heart rate every line. I used the UE4Duino plugin an it seems to open the serial port fine. I am at a baud rate of 115200. However, when I try reading serial and converting string to int it doesn't work. Can someone please help me. I need to convert to int to compare the heart rate with another value.Name:  HR BP.PNG
Views: 22164
Size:  96.7 KB

  39. #39
    0
    Quote Originally Posted by karanparikhpgl View Post
    This is a cool plugin! Thanks for building it. What I'm trying to do is rather uncomplicated, I have attached a Heart Rate monitor to my arduino and it serialprints the heart rate every line. I used the UE4Duino plugin an it seems to open the serial port fine. I am at a baud rate of 115200. However, when I try reading serial and converting string to int it doesn't work. Can someone please help me. I need to convert to int to compare the heart rate with another value.Name:  HR BP.PNG
Views: 22164
Size:  96.7 KB
    Hey karanparikhpgl,

    It looks like you don't have your execution line connected between your 'Read Serial' and 'Set' nodes so right now the blueprint is only executing up to the 'Read Serial' node.

    Hope that helps!

    -Tim

  40. #40
    0
    Hey,

    I'm with a small academic group attempting to build haptic gloves in conjunction with the Leap Motion. We're controlling the gloves with an arduino and this project seems perfect for what we're doing!

    Right now we're using an engine build from the github 4.7.6 source folder so we can use the built-in Leap Motion plug-in; when we attempt to load the project with this plug-in installed, the launcher warns that "UE4Editor-EU4Duino.dll is built with a different engine version" and prompts to rebuild (it won't rebuild).

    Not really sure how to address this issue. Do you have any insight?

    Thanks,

    Sean

Page 1 of 10 123 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •