You can use the 4.22.0 version. Unreal doesn’t require recompilation of the plugins for minor version updates.
https://github.com//UE4Duino/releases/tag/v2.2.4
i’ve question, is it possible to link multiple arduino on unreal?, if it possible then how ?. by using this plugin, thanks in advance
Had to recompile to get 4.22.3 to open :-\
Anyone have slow down issues?
I have a 3 potentionmeter color RGB color mixer setup in UE4 and after a few minutes things seem to slow to a crawl. I just started using flush port after a delay of a few seconds and that seems to keep things fast but there is a pretty ugly couple frame drop for a split second while the flush propagates and UE4 reobtains the values from the arduino.
Any tips?
Hi thank you for this awesome plugin. Everything works fine in the editor (4.21). But in the packaged game, the game crashes when the RFID Reader, reads the line. Have you any idea how can i fix this?
It’s possible by instantiating two Serial variables and using each one for a different Arduino connection.
Perhaps Arduino is spitting information so fast that when you flush there’s too much info to clear the comms. I’d flush every frame. That way each flush is faster and you never get too behind with the data from Arduino.
It’ll be really tough to find out what the problem is without seeing your code/blueprints. Does it crash if just send and receive some data from Arduino too? I mean, when you do simple comms, without using the RFID sensor.
Hello, thanks for your super fast response. After a few hours digging, I do not think the plugin causes the crash. It’s probably a structure call. Thank you anyway
Any guy can tell me how to convert the ReadBytes function’s output to hex?
If you’re using C++, there’s this function: https://docs.unrealengine.com/en-US/API/Runtime/Core/Containers/ByteToHex/index.html
In Blueprints, I think you’ll have to write your own.
Left digit will be byte / 16. Right digit will be byte % 16.
Then you’ll need a function to convert values higher than 9 to letters from A to F, for both digits.
Hello,
I’m on unreal engine 4.22.3 and am not seeing the close port blueprint.
I’ve tried simply moving the folder like the read me says and also have tried having only the source folder placed in the plugins folder and letting the engine rebuild it but i still only see the open serial port, int to bytes and bytes to stuff.
I’ve also tried installing unreal engine 4.21.2 and using the 4.21 binaries with the same result. (also tried rebuilding with the source folder here and same results)
am i doing something wrong?
I’m trying to find a way to output values through a serial port to a python code to then run the arduino.
Thank you for building this plugin, it looks great! Quick question: Is there a built-in method of transferring data from UE4 to the Arduino IDE? For example, I want to get the vector location of an object in-game in the Arduino code.
Thank you!
It’s part of the functions for a Serial variable. So you can only call this function when you drag a line from one.
I think your terminology is wrong because you can’t send stuff to the IDE, but if I understood you correctly, you can send floats to Arduino and read them using the example code in the .ino file that comes with the plugin. It’s commented, so you’ll know what I mean. But you might have problems to read 3 floats in sequence, like in a Vector. 3 floats will be sent as 12 bytes, but if you do that each frame, there’s no guarantee that Arduino and UE are in sync and you might read a float (4 bytes) that’s actually 2 bytes from one float and 2 from another (and problems like that). So you’d need to somehow make sure you’re reading the right bytes. I’ve written on some post on this thread about a protocol scheme I do in UE to sync data with Arduino. You’d need to do that in the Arduino code. Do a search for protocol. It’s one of the biggest posts that pop up in the results.
Hi,
Is there a way to check how many bytes of data are available in the serial buffer to be read? Let’s say I have sent a float data (4 bytes) from the arduino to UE4, I would like to have my program on UE4 to keep checking the buffer until there are 4 bytes before reading it. Is there also a “read a specified number of bytes” function that would block until the specified amount of bytes has been read?
Thank you.
I get the above error after I restart UE 4.23.1 after activating the plugin. (Win 10)
I have tried copying the UE4Duino folder to the Engine Plugins page as well as the Projects plugin page, redownloading etc.
Any help would be appreciated.
Thanks
Solved: Deleting binaries and Intermediate folders and rebuilding fixed it.
There’s no function to read the number of bytes in the serial connection nor one that blocks until a number is read. In fact, I’d never do anything that blocks unreal intentionally, as it sounds like bad design.
In your case I’d simply keep reading bytes from the serial with ReadBytes and storing them in an array until the array has 4 bytes. Then I’d use those 4 to make a float and clear the array. But if you’re trying to do that as a way to avoid getting split bytes from Arduino (like the last 2 from a float and the first 2 from another one), that wouldn’t solve it, because you could be splitting since the first time you called the function. You need to come up with a way to signal Unreal when you are going to send another float. In this thread, if you search for protocol, there’s a post where I describe how I overcome this type of problem with a protocol (like a router’s handshake).
If after you have built your app and the program refuses to run and in your log file you see the line
LogPluginManager: Error: Unable to load plugin 'UE4Duino'. Aborting.
Make sure that you have
"Installed": true,
in your UE4Duino.uplugin file.
Hi,
I’m using the UE4Duino for the first time and i’m having sync problems betwee the arduino output and the UE4 input read…
I believe that i have read most of the posts regarding this issue.
So i’m cheking the incoming string with a prefix and suffix.
but what i notice is that only if the incoming string is 8 characters long, i get a stable input. e.g. the prefix and suffix check results in true
Smaller or bigger length strings, result in fewer incoming strings passing the prefix and suffix check.
any idea why this could be?