[Free][Windows only] UE4Duino 2 - Arduino (COM port) communication

I´m having trouble running UE4Duino. I created a new project and put ue4Duino (correct version) inside Plugins Folder. When I try to open the project it says “failed to load plugin ue4duino because module could not loaded” And the project closes. I tried with version 4.23.1 and also 4.24.1 (I downloaded the two engine versions)
Imagem1.png

UPDATE:
I managed to solve it. If someone is experiencing the same, try this:

  1. Check if Visual Studio is installed with “game development with C++”.
  2. Create a unreal blank project with C++ and not Blueprint
  3. Create Plugins Folder under the project folder and put inside all ue4duino files without Binaries folder (delete it).
  4. Wait until the unreal project load and select rebuild plugin, when asked.
  5. After that, copy this ue4duino folder with your recompiled binaries to whatever project you want, including VR templates using only blueprints.
    that is it!

Hello,

Is it possible to use this plugin to wait for data from outside.

For example, sends a command from the PC to my device and then, wait for data or timeout reach.

What I see in some examples, it’s write data to the serial port, add a delay and then, read data from the serial port. I would like to be blocked until I receive some data OR reach a timeout.

Thanks

Hi!
I would like to ask you guys, How to dynamically get the COM port number?

You NEVER want to block Unreal. Instead, write a timeout logic while trying to non-blockingly get the answer from Arduino. Something like


SendCommandToArduino()
{
    Serial.Print("some command");
    CommandTime = WorldRealltimeSeconds;
}

Tick(float DeltaSeconds)
{

    if (CommandTime - WorldRealtimeSeconds > Timeout)
    {
        SendCommandToArduino();
    }
    else
    {
        Response = Serial.ReadBytes();
        // Check if response is valid
    }
}

This plugin doesn’t do it.
I did it years ago for a Unity application, but I had to call code to read the Windows registry. Something like checking the names of the devices registered on all existing ports and using the first one that matched the Arduino device, if any.

I didn’t do it for this plugin because I can’t know beforehand all possible Arduino device names. I only did it on the Unity application because I was only gonna use a specific board, which I got the name from Windows’ Device Settings.

Perhaps I could try to do it in the plugin and just return all names, so the burden to pick the right one would be on the final developer. It’s not as beautiful as I like a plugin to be, but at least it would give users an option.

@ Thanks for this plugin - it’s incredible. Do you plan on ever making it compatible with Mac?

Thanks! I can’t take all the credit. I can’t take most of it actually haha. I just improved an existing plugin.
No plans for Mac. I’m not a fan of Apple, I don’t own one and don’t plan on doing so. It’s too expensive compared to building a PC of same power and not cool for gaming.
Sorry for the rant, but I don’t wanna create false hope xD

Hello,

I finally did it (USB HID communication on Unreal Engine), but I don’t think you will be able to implement it in your plugin since it’s a little special plugin I did.

I splitted the plugin into two parts, one is to use my program with a little modification applied: https://www.codeproject.com/Articles…ices-using-HID

And I used a short code C++ plugin that will communicate with the previous tool in order to have the USB data inside unreal engine.

So, how do you want that, a tutorial or I give you a template + the USB tool.

I tried to implement the USB tool inside a C++ plugin, but it crashed and slowed the game since I need an infinite loop in my USB tool.

Hey folks,
I came across some weird behaviour regarding keyframes in recorded Takes.
I have a simple cube that I constantly rotate by a fixed value around itself using the “AddRelativeRotation” node. Recording that using the Take Recorder I get an animation curve that looks like this.
https://preview.redd.it/8dv6zdvkrrg51.png?width=1376
stepped animation curve

I rather assumed a straight linear curve. Also I can’t explain myself why there a always 2 keyframes “inside” the same frame. I thought I would get 1 keyframe per frame.
In the Take Recorder I set “Remove redundant tracks” to false as well as “Reduce Keys”. However, enabling “Reduce Keys” shows the same behaviour.
BTW: this behaviour is also shown when recording data received via Arduino or from a Vive tracker.

Hopefully someone can help me out on this one.
cheers!

Hello everyone,
I have been working with this library it is really good.
I started a project in which I am making a graphic user interface using the unreal engine for a Scara Robot.
I am using this library for serial communication.
the problem I have is that :
I want to make the serial port variable "Arduino " in your case general, in other meaning, I have different widget display in which I want to interact with them all.
since I am new to blueprints. i tried to create the “Arduino” variable in my character and then use it’s reference in widgets .
the question is that :
IS IT POSSIBLE TO MAKE THE SERIAL PORT VARIABLE “arduino” a reference or should i create a new variable and open the port and close it whenever i open a new widget .
or it is possible to create a global "arduino variable " and use the method get player character to get it the other widgets.
thank you , i hope that i have explained my problem well .

Hi guys. Also new here regarding Arduino UE4 communication. The UE4Duino plugin is installed. I need the simplest sketch and blueprint to start with. A push button with Arduino that will turn on/off a light in Unreal. Any help?

hi thank you for this excellent plugin, can i make this able to support 4.25 or 4.26?

Hi all.

Not sure if what I am experiencing is a bug or intended functionality, but I am trying to read sensor data from an arduino nano 33 ble in unreal engine, but it can’t read in any data unless the arduino serial monitor has been ran prior to running unreal engine.

Has anyone else experienced this and is there a way to avoid this?

Cheers.

Updates for 4.26.1?

Make sure your blueprint/code is closing the serial connection when you close the game/exit the level. And also flush when connecting to it to avoid getting old data accumulated in the serial.

Done. https://github.com//UE4Duino/releases/tag/2.2.5

would it be possible to use this plugin in combination with an oculus quest?

It is for Windows only, as it uses the serial APIs from Microsoft.

EDIT: UE4Duino 4.24.1 works great with 4.24.3 built from source. Happy trails and great thanks to !

After updating to 4.24.3 the plugin can’t be loaded. It packages fine without errors but trying to open the packaged project no window opens and the log shows just “unable to load plugin”… would i be so lucky that any minor change in plugin file could resolve this? Im building the 4.24.1 editor from source now but im still a bit worried i cant revert my project from .3 to .1…

Hello everyone,
this is my first post in this Community, I hope this Post is at the right spot here and someone can help me with my little Problem :)​
I’m working on a VR Project in UE4 for the Oculus Quest One, in which I’m supposed to add some kind of HUD or Widget to the Players View. This is supposed to show constantly live-Data from a Arduino or another Bluetooth source. (I already figured out a way to add a Widget constantly to the VR Viewport, so I’m good with that. yay :D​ (Screenshot: WidgetVR)

I’m very happy I found this Plugin to work with as well. I’m currently working on reading random numbers (between 50 and 100) from a Arduino into the Unreal Engine (4.24) and I’d like to draw the Data (live) into the Widget-Blueprint. I’m very new to UE4 and Blueprints and unfortunately, I’m not good at programming and therefore I like working with Blueprints.

I was looking for a solution for my Problem and I found two Plugins for that. I’m specifically looking for some kind of “read serial” function and fortunately I found to different UE4Duino versions. One of them only works till the Engine Version 4.9 and has exactly the Blueprint I need (“read serial”). (I can’t find another “newer” version for this exact term:
UE4Duino - Arduino to UE4 plugin Release! - Community Content, Tools and Tutorials - Unreal Engine Forums )

It worked perfectly in UE4.9, just the way I needed it and I hoped I could make it work in UE4.24 as well. Therefore, I tried to read the serial with this Plugin here as well, but I can’t read it as proper as with the “read Serial” function.
I know that this UE4Duino Plugin only works on Windows and not on Android. This isn’t the issue. My problem is that I’m not able to properly read the data from the Arduino.

I’d like to draw the Data onto the Widget-Blueprint which I can’t get to work, either it says like “none” or it’s just a blanc space or a 0 (Screenshot: Game_View) where the Data is supposed to be. But it kind of works in the Level Blueprint, I’m able to Print the Data with the Blueprint (Screenshot: Level_blueprint). But I’d like to draw it in the Widget anchored to one spot. I tried different Text Bindings like Screenshot: ReadString, but it seems that my Blueprint is either not properly connected or my references within the blueprint isn’t correct?
I tried different COM ports, plugging the Arduino out and in again, connecting different “read” function from the UE4Duino in Widget- and Level Blueprint, I worked with different Blueprint ideas in the Widget-Blueprint but I just can’t seem to make it work in the Version UE4.24.
Could the Variable be incorrect? (Screenshot: ArduinoVariable) I’m Using the Object Type -> Serial -> Object Reference

I’m sure I could find a simple solution but right now I really can’t see it and I was hoping someone could help me. Like I said I’m a beginner and I hope I’m not bothering you with this little problem.
Here are some screenshots, maybe I’m just connecting the Blueprint wrong or I’m using the wrong Blueprints?
I would really appreciate your help.
Please don’t hesitate to ask for other screenshots or anything that could help me with this problem.

Right now I’m waiting for another Plugin as well but I’d like to work this Problem out with the Arduino because I could also use another VR headset as well, if I could find a solution.

In the End I’d like to show the Data from the Arduino (BPM-Data) and a Progress bar which is connected to the Data to dynamically move with the input data (which I tried and can’t work out either…)

Thank you VERY MUCH in Advance.