UE4Duino - Arduino to UE4 plugin Release!

UE4DUINO 2.0 problem with string

Hello guys,

I’m currently working on connecting two Arduino simultaneously. So I installed new version of ue4duino and i have problem with output of Arduino inside Unreal Engine. The serial monitor of arduino shows that everything is ok and my potentiometer works fluently. Inside UE4, values are freezing or working with huge delay, or working for some time and freezing.

My script is below
My blueprint is classic - as posted above.

Thank you in advance

int val2,val3,val4 = 0;

void setup()
{
Serial.begin(9600); // setup serial
}
void loop()
{
val2 = analogRead(A2);
val3 = analogRead(A3);
val4 = analogRead(A4);
Serial.print(val2); Serial.print(‘,’);
Serial.print(val3); Serial.print(‘,’);
Serial.println(val4);
delay(1);
}

Hi,

I am having a problem with the plugin. I am using the version that posted but on a 4.12 version. The problem I am having is that only the “Open Com Port” node is showing up in Blueprints, rest of them do not. Any idea why?

Thanks in advance!

CC:

Hello

I am new to Unreal4 Blueprints and I am fighting against it to make a simple blueprint to make my servo move, and I have no idea how to make it work so when I press J the servo moves a little bit and when I press U the servo goes back a little bit. I’ve put the code inside the arduino and tested it myself on the input window, but I am sure I am doing something wrong somewhere in the blueprints. I’ve tried looking all over the internet about examples on U4 Blueprints with the Arduino plugin but no luck at all. Could someone help me?

Thanks in advance.

EDIT: Nevermind, it was a problem inside Unreal, silly me and my noobiness on Unreal

It’s very cool.Thanks a lot.
And I met a question that UE4.14 is always collapse.Is there any way to solve this problem?

Hello guys i have a question in the blueprint, how can i insert the block “SET” or what is the name for this block?, thank you . :cool:

^ second this i just need a variable type

update it to 4.15?

fvrcifer - did you manage to get separate two arduinos linked with unreal? If so how did you open two different com ports at the same time?

4.15 Update

Hi, the thread has been inactive for some time… Are you still planning to add 4.15 support? that would be great, since im working on a vr experience and using arduino for the inputs, and the vr performance has greatly improved since 4.10

Hopyou see this message…

Just read some messages below, it says how to recompile for 4.15, and has a downlodable version of 4.14

i have one question
how can we find desired port?

user can connect our device to any port?

For those having laggy serial read problems on Windows 10, the solution is to put some delay at the end of your code so that Unreal doesn’t get flooded with too much information coming back to back. Setting the frame rate cap to 60 also helped get rid of the lag. I set the delay to 33 ms and I now have zero lag when reading my Arduino’s information through Unreal :slight_smile:

Hi guys,

The plugins work perfect until now in ue 4.15, great work, thank you.

i hope you can help me and maybe help others too.

How can I store the instance from the port COM (the one before the flush COM (Set Arduino)). It is a variable? and what kind? object? there are too many, and another thing, when i create the blueprint class which one you recommend?

Thnks for everything.

I have installed 4.14 version on my 4.15 installation, now it’s visible in Plugins window, I did not do anything, I was thinking to packege it and I got some error.
Please check why I cannot export project to Windows10 64 bits:

UATHelper: Packaging (Windows (64-bit)): Running AutomationTool…
UATHelper: Packaging (Windows (64-bit)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=D:/ArduinoUE4/Ar2bp/Ar2bp.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=D:/ArduinoUE4/Ar2bp/Ar2bp.uproject -cook -stage -archive -archivedirectory=D:/ArduinoUE4 -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.e
xe -pak -prereqs -nodebuginfo -targetplatform=Win64 -build -CrashReporter -utf8output
UATHelper: Packaging (Windows (64-bit)): Automation.Process: Setting up command environment.
UATHelper: Packaging (Windows (64-bit)): BuildCookRun.SetupParams: Setting up ProjectParams for D:\ArduinoUE4\Ar2bp\Ar2bp.uproject
UATHelper: Packaging (Windows (64-bit)): Project.Build: ********** BUILD COMMAND STARTED **********
UATHelper: Packaging (Windows (64-bit)): CommandUtils.Run: Run: C:\Program Files\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game Win64 Development -generatemanifest -nobuilduht -xgeexport -remoteini=“D:\ArduinoUE4\Ar2bp” -NoHotReload
UATHelper: Packaging (Windows (64-bit)): UnrealBuildTool: ERROR: No modules found to build. All requested binaries were already part of the installed engine data.
UATHelper: Packaging (Windows (64-bit)): CommandUtils.Run: Run: Took 0.6276691s to run UnrealBuildTool.exe, ExitCode=5
UATHelper: Packaging (Windows (64-bit)): Program.: ERROR: AutomationTool terminated with exception: AutomationTool.CommandUtils+CommandFailedException: Command failed (Result:5): C:\Program Files\UE_4.15\Engine\Binaries\DotNET\UnrealBuildTool.exe UE4Game Win64 Development -generatemanifest -nobuilduht -xgeexport -remoteini=“D:\ArduinoUE4\Ar2bp” -NoHotRe
load. See logfile for details: ‘UnrealBuildTool-2017.04.26-15.12.58.txt’
UATHelper: Packaging (Windows (64-bit)): at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars, SpewFilterCallbackType SpewFilterCallback) UATHelper: Packaging (Windows (64-bit)): at AutomationTool.CommandUtils.RunAndLog(CommandEnvironment Env, String App, String CommandLine, String LogName, Int32 MaxSuccessCode, String Input, ERunOptions Options, Dictionary2 EnvVars, SpewFilterCallbackType SpewFilterCallback)
UATHelper: Packaging (Windows (64-bit)): at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Dictionary2 EnvVars) UATHelper: Packaging (Windows (64-bit)): at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, FileReference Project, String Target, String Platform, String Config, String AdditionalArgs, String LogName, Dictionary2 EnvVars)
UATHelper: Packaging (Windows (64-bit)): at AutomationTool.UE4Build.XGEPrepareBuildWithUBT(String TargetName, UnrealTargetPlatform Platform, String Config, FileReference UprojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, String InAddArgs, Boolean ForceUnity, Dictionary2 EnvVars) UATHelper: Packaging (Windows (64-bit)): at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean InForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 PlatformEnvVars, Nullable1 InChangelistNumberOverride, Dictio
nary2 InTargetToManifest) UATHelper: Packaging (Windows (64-bit)): at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) UATHelper: Packaging (Windows (64-bit)): at BuildCookRun.DoBuildCookRun(ProjectParams Params) UATHelper: Packaging (Windows (64-bit)): at BuildCookRun.ExecuteBuild() UATHelper: Packaging (Windows (64-bit)): at AutomationTool.BuildCommand.Execute() UATHelper: Packaging (Windows (64-bit)): at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) UATHelper: Packaging (Windows (64-bit)): at AutomationTool.Automation.Process(String] Arguments) UATHelper: Packaging (Windows (64-bit)): at AutomationTool.Program.MainProc(Object Param) UATHelper: Packaging (Windows (64-bit)): at AutomationTool.InternalUtils.RunSingleInstance(Func2 , Object Param)
UATHelper: Packaging (Windows (64-bit)): at AutomationTool.Program.()
UATHelper: Packaging (Windows (64-bit)): Program.: AutomationTool exiting with ExitCode=5 (5)
UATHelper: Packaging (Windows (64-bit)): BUILD FAILED
PackagingResults:Error: Error Unknown Error

Upd:
I got plugin working under WIndows 10, UE4.15 with Blueprint FirstPerson Template, but cannot package it, always some error, please help to fix it!

Long time no see

Sorry, guys! I wasn’t being notified for this thread and saw nothing until today when I was messing around with the forum’s settings.

I’m very happy to have helped some people! :smiley:
Thanks to @DylanBatt74 for helping with good insights.

The ones having problems, it’s so many things I don’t know where to start from. :confused:

I see the most occurring is the "
" one. Could someone please elaborate more on it so I can try to solve it?

@fvrcifer and anyone else having trouble with lag:
From the UPDATE release notes:

You’re missing [FONT=Lucida Console]Serial.setTimeout(10); on the Arduino code.

If you’re still having problems (I don’t know since I’m late), please PM me. I’ll try to keep a better eye on this thread anyways. I advise though: depending on the problem complexity, it may be better to do a consultation and I’ll charge US$ 30/hour for those. For people reading this years from now, the price has most likely raised LOL

Hi Guys,
Been having real issues with the following project, I got a Protocentral Pulse/Ox board strapped to an arduino. now my goal is to get both values of the heartrate and the Ox to show within unreal. the setting up of the Protocentral board and arduino went perfect.
Now to get these values to show up within unreal has been a massive struggle. This is a school project and hoping to find someone who can either teach me or can provide me with a blueprint that makes this possible. I am willing to pay (what is in my budget) to compersate for the time it takes.
if you think you can help me out of this nightmare please email me at darkskyfell@yahoo.com. I hope its ok to post this here but i am past despirate.

@DylanBatt74, , @ ;
Does someone of you (or anyone else) have a clue how to adjust your UE4Duino Plugin to the version 4.16. Alas I do not know how to do it myself…

@Speck97 I’ll try to do it this weekend :slight_smile:

RVillian: ://media.giphy.com/media/NbgeJftsErO5q/giphy.gif
Aweesome :slight_smile: thanks for your quick reply :slight_smile: I am forever grateful you making this real!

[UPDATE] Compatible with UE 4.16,
fixed

UPDATE!

UE4Duino 2.1

Mainly, this version updates the plugin to comply with Unreal Engine 4.16 IWYU standards and corrects the
problem when reading lines from Arduino (thanks @crgallac for pointing that out).
There are a few minor changes as well, but only one that may break a connection in Blueprints: the OpenPort member function had one of it’s inputs renamed to match the OpenSerialPort static function. This may break an existing connection to that input.

The zip below contains binaries for UE 4.16.0, but it compiles successfully on 4.15.
Download: UE4Duino_2.1_UE4.16.zip

I’ve also created a Git repo on GitHub, so if anyone fixes or improves something, please issue a pull request.
GitHub repo: RVillani/UE4Duino

CHANGE LOG

  • Fix - ReadLine correctly filters out Arduino’s Serial.println "
    " line ender from returned String;

  • The plugin successfully compiles and packages on Unreal Engine 4.16;

  • Added functions comments so you know what a node does by hovering the mouse over it;

  • Changed all “COM” in function names to “Serial port”. It won’t affect existing code nor Blueprints;

  • Added WriteLineEnd variable to choose the kind of line ending used with PrintLine;

  • Added LineEndToString function to convert LineEnd enum variable to String;

  • Added Arduino script “ArduinoTypesExample” showing how to send integer and float values to Unreal (not Strings).

  • Updated and added Example images.

  • Unreal Engine 4.16 uses the IWYU convention, so:

  • Updated UE4Duino.Build.cs to enfoce IWYU compliance and updated the deprecated constructor;

  • Removed plugin PCH file;

  • Included only minimum required headers to compile. Compiling is much faster now.