User Tag List

Page 3 of 10 FirstFirst 12345 ... LastLast
Results 81 to 120 of 377

Thread: UE4Duino - Arduino to UE4 plugin Release!

  1. #81
    0
    Hey,

    A couple questions:
    1)
    I'm working on developing a controller from a physical ATV to control a virtual ATV in my game. I have established a serial connection and can view the serial port as open, but after the first burst of data the serial port no longer communicates and I can no longer send data to UE4. I need this in order to control steering, throttle, and braking in the game.

    2)
    When I do a serial write what should be the corresponding line in my arduino code be to capture the data being sent? I haven't really experimented with this yet, but I need to send quaternion values back to my arduino to be repackaged as udp packets.

    Thanks,

    Jake
    Last edited by John Michael; 08-25-2015 at 02:11 PM.

  2. #82
    0
    Just wanted to follow up to my own post, I had success last night altering my arduino sketch a little bit. Turns out the lag I was experiencing was due to tringing my LED with a string over Serial. When I had the board listen for a single byte everything worked much better. I thought I'd share the sketch in case anyone else with little experience stumbles across this thread.

    I think it's also worth sharing that I used a Littlebits Ardurino Heart module so everything was really really simple to get going with no prior knowledge.



    //

    // Simple script to test a single port on a Littlebits Arduino Heart with and LED conected
    // to a trigger volume in Unreal 4.

    //


    const int ledPin = 1; // the pin that the LED is attached to
    int incomingByte; // a variable to read incoming serial data into

    void setup() {
    // initialize serial communication:
    Serial.begin(9600);
    // initialize the LED pin as an output:
    pinMode(ledPin, OUTPUT);
    }

    void loop() {
    // check for incoming serial data:
    if (Serial.available() > 0) {
    // read previous byte in the serial buffer:
    incomingByte = Serial.read();
    // turn on the LED:
    if (incomingByte == 'Y') {
    digitalWrite(ledPin, HIGH);
    }
    // turn off the LED:
    if (incomingByte == 'N') {
    digitalWrite(ledPin, LOW);
    }
    }
    }

  3. #83
    0
    Hi grizly32, thank you for this awesome plugin!
    I'm trying to map speed values in unreal to analoWrite values. I converted strings to integers, but this method seems to be very slow and unreal crashes very often.
    What would be a better/stable method to control values dynamically?
    also, I've see the fusionlabs example on youtube, where the rotation of the puppet is controlled by a Poti. Could you post the example code?
    Any help would be great!

  4. #84
    0
    I Just updated the plugin to support 4.9 UE. Download with the new link, now it includes the source files for the plugin.

    Changes made:-

    1) edited file “file_name”
    2) Changed the "Slate.h" header file in "UE4DuinoPCH" to "SlateBasics.h"

    Just use the download link below!

    https://drive.google.com/file/d/0B7hqDvPVJ_50X2ZYUlZnVkhnZGs/view?usp=sharing
    Last edited by Providence94; 09-08-2015 at 11:39 PM.

  5. #85
    0
    Hi Providence,

    Thanks again for updating this great plugin. I tried downloading the above link, but it keeps saying that I need to request permission for google drive.

  6. #86
    0
    Hi Im sorry.i forgot to change the sharing options.No Worries.I Have changed it now..
    i have updated my post.
    here you go.
    https://drive.google.com/file/d/0B7hqDvPVJ_50X2ZYUlZnVkhnZGs/view?usp=sharing

  7. #87
    0
    Hi,

    will there be a 4.9 release as well ? if not what about 4.8.3 ( the latest 4.8 ) ?

  8. #88
    0
    Quote Originally Posted by Providence94 View Post
    I Just updated the plugin to support 4.9 UE. Download with the new link, now it includes the source files for the plugin.

    Changes made:-

    1) edited file “file_name”
    2) Changed the "Slate.h" header file in "UE4DuinoPCH" to "SlateBasics.h"

    Just use the download link below!

    https://drive.google.com/file/d/0B7hqDvPVJ_50X2ZYUlZnVkhnZGs/view?usp=sharing
    Plugin for 4.9 is currently available.

  9. #89
    0
    I Was Wondering About This A While Ago, That's A New Cool Type Of Plugins! Thanx For Sharing.

  10. #90
    0
    Hi Grizly,
    been using your awesome plugin over 6 months now. Made a steering wheel set up and now onto making a model smart home but I'm still trying to work out how to use the serial write. What does it tell arduino/ where does it go out? There is like nothing covering that atm. Srry if I'm not getting it though.
    Thanks,
    Elliott

  11. #91
    0
    Has anyone been able to build a project with this plugin? Every version that comes out I try to do a build and every time I get no errors on build but when I open my exe file I get UE4Duino could not be found please consider building without plugin. Is there something I'm missing to building with this? Thanks!

  12. #92
    0
    Freakin Amazing!!!

  13. #93
    0
    Quote Originally Posted by John Michael
    Hi AliasOmega,

    I've been trying to work up a steering wheel controller for quite a while now, but have had some issues. I can only get the plugin to read the first value and after that it stops reading new values from my potentiometer. Do you have any samples you could share with me. I'm designing a simulator for my masters thesis and it would help me immensely. Also, were you working out of the C++ or Blueprint version of UE4?

    - John
    Hi John so I finished this for a University project I'll link you the blog where we finished our work. Though I'd appreciate if you didn't send it as a private message and keep on the forums so other people can see this. Note of warning though as it wasn't fully finished just the wheel and it was done with the steering not fully completed but should give you an idea of what we did. Not sure about some of your issues, you need to be a bit more in depth like which arduino were you using, hows your arduino code, blueprint setup etc. Good luck

    http://thedrivingmachine.blogspot.com.au/

  14. #94
    0
    In regards to my above post:

    I took the executable off of the "Event Tick" Boolean, and switched it to the "InputAxis MoveForward" Boolean, and it's working great now. Video below shows one of my co-workers using the ATV as a controller for UE4. YOu can see the screen in the background has him navigating a course.



    -John

  15. #95
    0
    Quote Originally Posted by Jacopo View Post
    I'm using that sketch and blueprint with the latest UE4Duino version 1.9 with the unreal version 1.9.1
    The writing to arduino to turn on the led is working fine, but the reading still isn't working.
    Has someone found a solution for that read problem yet? I'd like to use this for my school project.

  16. #96
    0
    Hey all! Have to apologize again that I have been out of touch for so long!

    First off, want to say a big thanks a ton to Providence94 for updating the plugin to 4.9! Awesomesauce!

    @JohnMichael - Very cool with the ATV setup!!

    @jeremycouillard - I have been trying to get the plugin to package correctly, but haven't had success yet. Right now I can get it to package without errors, but when I try to run the game exe it doesn't do anything...I double click on it and it just sits there. I will keep looking into it and let you know if I get it to work. Anyone out there manage to package a working game with the plugin?

    @Lozoo501 - I tried your setup from the images and everything seemed to work ok for me...the light went on and off and I had the SerialRead showing the two text messages on screen. What do you have showing up when you run it?

  17. #97
    0
    By the way, if you could figure out how to get support for Android I would be eternally grateful. I'm trying to make an Android app to control an Arduino project, and currently I could do it with Unity, but both Unity 4 and Unity 5 have baked lighting issues on mobile while everything looks amazing and perfect on UE4, only downside is no Arduino support for Android with UE4.

  18. #98
    0
    I am in need of UE4duino plugin that is compatible with engine version 4.9.
    This link doesn't seem to work.
    https://drive.google.com/file/d/0B7h...ew?usp=sharing
    Please help.

  19. #99
    0
    Quote Originally Posted by grizly32 View Post
    I tried your setup from the images and everything seemed to work ok for me...the light went on and off and I had the SerialRead showing the two text messages on screen. What do you have showing up when you run it?
    Code:
    String input;
    
    void setup()
    {
    	Serial.begin(9600);
    	pinMode(13, OUTPUT);
    	digitalWrite(13, LOW);
    }
    
    void loop()
    {
    	//Serial.println("Wazzaaaahhh");
    	//delay(2000);
    	//digitalWrite(13, LOW);
    	//delay(2000);
    	//digitalWrite(13, HIGH);
    
    	if (Serial.available() > 0)
    	{
    		input = Serial.readString();
    		if (input == "ON")
    		{
    			digitalWrite(13, HIGH);
    			Serial.println("TURNED ON");
    		}
    		else if (input == "OFF")
    		{
    			digitalWrite(13, LOW);
    			Serial.println("TURNED OFF");
    		}
    	}
    
    	//Serial.println(2);
    }
    Name:  blueprint.png
Views: 1420
Size:  254.0 KB

    I'm getting a compiler error now, while I don't remember getting that last time although, I can still play the game with the same effect (and problem) as before. The error says something about an array I guess? But I don't have any code besides the blueprint that I've shown which doesn't include one (kinda odd unless it has something to do with the plugin).
    Info ERROR: System.ArgumentOutOfRangeException: De index valt buiten het bereik. Deze mag niet negatief zijn en moet kleiner zijn dan de grootte van de verzameling.
    Info Parameternaam: startIndex
    Info bij System.String.LastIndexOf(Char value, Int32 startIndex, Int32 count)
    Info bij UnrealBuildTool.UnrealBuildTool.PatchActionHistoryForHotReloadAssembling(List`1 OnlyModules)
    Info bij UnrealBuildTool.UnrealBuildTool.RunUBT(String[] Arguments)
    LogTemp: THREAD STARTED!!
    LogTemp: SERIAL PORT OPENED!!
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0] Open
    PIE: Info Play in editor start time for /Game/FirstPersonBP/Maps/UEDPIE_0_FirstPersonExampleMap 1.31
    LogBlueprintUserMessages: Late PlayInEditor Detection: Level '/Game/FirstPersonBP/Maps/FirstPersonExampleMap.FirstPersonExampleMap:PersistentLevel' has LevelScriptBlueprint '/Game/FirstPersonBP/Maps/FirstPersonExampleMap.FirstPersonExampleMap:PersistentLevel.FirstPersonExampleMap' with GeneratedClass '/Game/FirstPersonBP/Maps/FirstPersonExampleMap.FirstPersonExampleMap_C' with ClassGeneratedBy '/Game/FirstPersonBP/Maps/FirstPersonExampleMap.FirstPersonExampleMap:PersistentLevel.FirstPersonExampleMap'
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    ..... (alot of these empty logs)
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0] SERIAL OPENED
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    ....
    LogBlueprintUserMessages: [FirstPersonExampleMap_C_0]
    LogBlueprintUserMessages: Early EndPlayMap Detection: Level '/Game/FirstPersonBP/Maps/FirstPersonExampleMap.FirstPersonExampleMap:PersistentLevel' has LevelScriptBlueprint '/Game/FirstPersonBP/Maps/FirstPersonExampleMap.FirstPersonExampleMap:PersistentLevel.FirstPersonExampleMap' with GeneratedClass '/Game/FirstPersonBP/Maps/FirstPersonExampleMap.FirstPersonExampleMap_C' with ClassGeneratedBy '/Game/FirstPersonBP/Maps/FirstPersonExampleMap.FirstPersonExampleMap:PersistentLevel.FirstPersonExampleMap'
    LogTemp: THREAD CLOSED!!
    LogTemp: SERIAL PORT CLOSED!!
    It's just not picking up the Serial.println() for some reason.. I've tried changing the baud rate and putting the println method on different places, but it just isn't doing anything in unreal.. although it works fine in the serial monitor (and no I didn't have it open when trying in unreal).

  20. #100
    0
    @madhu27 - Sorry about that....I copied the link incorrectly...

    Try the link in the first post again...should be good now

  21. #101
    0
    Hi Guys, A really great plugin and documentation made it very to set up and test. Is there a method to deal with many inputs?

  22. #102
    0
    I have a strange problem I have had since I started using the plugin. My Unreal project sends sequentially commands on the serial port. it happens that some command is ignored / skipped
    and the Arduino board doesn't receive the command. If I restart the application (in the editor) the app work correctly and other times not.
    Launching the same commands from the Arduino "Serial Monitor" everything works properly.
    I noticed also that doing so many serial write in a short time, they are not being received properly by the arduino board (no comunication)

    Can you help me please?

  23. #103
    0
    @Grizly32 (or anyone)

    Is there any way to view what UE4 is sending over serial when using the serial write command. I'm doing a really basic attempt at lighting an LED when a vehicle goes over a certain speed, but it won't seem to light. I'd use the arduino serial monitor but unfortunately you can't use the serial monitor and UE4duino at the same time. The arduino code worked when I was sending it commands over the serial window, so I assume something is going wrong on the UE4 end.

    johnmichael

  24. #104
    0
    Hi Guys, A really great plugin and documentation made it very to set up and test. Is there a method to deal with many inputs?
    @Moykul

    Many inputs as in several signals being sent over serial or many inputs as in multiple arduinos? If you are using multiple arduinos you just need to open serial ports for each of your arduinos. If you are hoping to send values for multiple analog signals you need to write them all to a single line with some sort of delimiter between the data. For example: Serial.print(A0); Serial.print(","); Serial.print(A1); Serial.print(","); Serial.println(A2); This would print a single line with three analog inputs from pins 0,1, and 2. It's important to only use Serial.println(); on the last analog signal because that is what the Serial Read boolean is looking for. In your blueprint, there is a function called "Parse Into Array" which will take the values and put them into an array based on what you chose as your delimiter, in the case above ",". Then you can break the values out of the array using "Get Array" and use your data.

    John Michael

  25. #105
    0
    I have tested some more with my arduino, it seems to work on 4.9.0 / 4.9.2 with windows 8 laptops..
    but it does not work on 4.9.0 / 4.9.2 with windows 10 laptops :[] and if you google something like: "windows 10 problems comm port", you do get some results.. :/
    I think my teacher also tried it with teensy's with the same problem, only working on windows 8.. (i'm not sure about other windows versions)

  26. #106
    0
    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 Images Attached Images  

  27. #107
    0
    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.

  28. #108
    0
    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!

    Name:  Potentiometer_LED_Example_Blueprint.jpg
Views: 1223
Size:  147.3 KB

    Name:  Potentiometer_LED_Example_Arduino.jpg
Views: 1276
Size:  143.5 KB


    @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...

  29. #109
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    139
    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!

  30. #110
    0
    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.

  31. #111
    0
    @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...

  32. #112
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    139
    Thank you grisly32!!

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

    you rock!

  33. #113
    0
    @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:

    Name:  ServoConnections.jpg
Views: 1141
Size:  43.0 KB

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

    Name:  ServoArduino.jpg
Views: 1191
Size:  101.1 KB

    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:

    Name:  ServoUE4.jpg
Views: 1218
Size:  535.3 KB

    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

  34. #114
    0
    Samaritan
    Join Date
    Mar 2014
    Posts
    139
    grisly32! Thank you thank you thank you! will try tonight!

  35. #115
    0

    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_ERZpvFDwRDWXV1Y21HNjZSdkU/view?usp=sharing

  36. #116
    0
    @Skittluier - That's awesome! Thanks for the update!

  37. #117
    0
    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.

  38. #118
    0
    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!

  39. #119
    0
    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.

  40. #120
    0
    Supporter
    Join Date
    Nov 2015
    Posts
    6
    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.

    Name:  Arduino.jpg
Views: 1085
Size:  96.1 KB
    Name:  Blueprint.jpg
Views: 1074
Size:  147.4 KB
    Attached Images Attached Images  

Page 3 of 10 FirstFirst 12345 ... 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
  •