UE4Duino - Arduino to UE4 plugin Release!

Hey moonller,

Sorry to say that I am currently not using Win10 yet…maybe someone out there who does have it can recompile and post? :slight_smile:

Also, just want to say to all that I am still trying to figure out the packaging issue with the plugin.

Anyone out there figure out a way to get this working with packaged game?

Whenever I try to do it, it compiles ok but when I try to run the packaged .exe it doesn’t do anything.

Any help would be great!

Hello! First I want to thank you for this amazing plugin, you’re a life saver! Now, to the problem, heh.
I’ve been using Arduino for years now so I don’t have problems from his part… UE is what bugs me… Installing the plug in and getting info from the serial port was the easiest thing ever… However, I have absolutely no expreience with UE.

What I’m trying to do: Read sensor(gyro) values from arduino and make UE4 use those values for position data. I’ve seen People make plastic gun controllers and I see no reason it couldn’t be done, but my lack of UE experience is getting in the way…

In plain simple, I don’t understand nor know where to begin on understanding/implementing, how to make an event take that data and store it into “position” params(so that moving the gyro moves an object in UE)… I’ve watched several tutorials and read the documentation, but all I could find was giving the object position data from keyboard input or gamepad or similar. How did you guys manage to make data from serial to affect a certain event in UE? Can you maybe point me to a tutorial or something of that kind where it’s explained?

Thanks in advance

Hi Moonler - I can’t get the plugin to work with either 4.10.1 or 4.10.2 - I am using windows 10. Can you let me know how you got it to work for you ?
Can you elaborate on this as I don’t fully understand what you mean: “Try using the blueprint only option and not the C++ blueprint.”

Thanks for the update - if anyone could recompile it for Windows 10 it would be great.

@joeycampbell - when creating a new project on my windows 10 machine - it gives two options for the tabs - blueprint or C++. By choosing blueprint I didn’t have to recompile and the plugin worked for 4.10.2 for me.

@linchee - You might want to start by turning a light on and off using an Uno and the Serial blueprint plugin here that so graciously provided. Turning on and off a light is like Hello World in programming. There are several examples on this thread of the C code you need and the blueprint layouts. There is also one post from showing how to run a servo with code. As far as using blueprints themselves - Unreal has a channel with tons of videos explaining them.

@linchee - Your name triggers “Post rejected because of a score of: 30 Rejection set to: 30.” a lockout when I tried to reply to using your full name. Super annoying

@ I wrote out a fairly long thread replying to you but it never posted. First of all thank you for making this plugin! PM me if you are interested in some of my debug thoughts on what is happening. I’ve spent a fair amount of time going over it.

:slight_smile: Thanks for developing and making such a wonderful plugin available for us all. It works like charm. My concern is how to communicate with arduino over http/internet in case I need functionality on Android or remotely? Is there some Json/rest/http work around possible or you have any plans to develop such functionality?

Hi MacX - when you are creating a new project on windows 10 did you have the UE4Duino plugin placed in the application plugins folder prior to crating a new project or did you place the plugin into the games content folder after creating the new project ? In either case did you place the entire content of the Ue4duino folder inside the plugins folder or just one particular file ?

Put the ue4duino folder in plugins folder.

,

C:\Users\Mac\Documents\Unreal Projects\arduino - Where arduino is the name of my project. I create the project I close UE4. I create a plugins folder where I put all of the contents of the UE4Duino plugin in. I restart UE4

i.e C:\Users\Mac\Documents\Unreal Projects\arduino\Plugins

So I am trying to move a person using a potentiometer attached to my arduino like shown in an example video. I am not sure how to go about using the serial ports in order to control the character’s movement in blueprints. I know I should be connecting all the ue4duino parts to InputAxis MoveForward as well as InputAxis MoveRight but I’m not sure where to go from there. If anyone could help it wold be greatly appreciated. Right now I am just using the third person new blueprint game. I’m trying to add it to the movement in yhe third person character movement.

Please someone answer my query.

@NomanShah - Sorry for the late reply…I am eventually going to try and incorporate Bluetooth one of these days (not anytime soon though due to other priorities) but as far as using arduino with JSON there is a plugin I found which could maybe be used with UE4Duino?
://forums.unrealengine.com/showthread.php?7045-JSON-Query

Also, I don’t see why you couldn’t just treat it like a multiplayer network game and start a server with the arduino connected, connect to the game as a client remotely and just control from the game.

However, the two biggest issues remaining are that (1)I am still having problems getting the plugin to package correctly and (2)UE4Duino doesn’t work on Android as it is Windows based. I am working on the packaging problem, but don’t currently have plans to port to Android.

Dear , thanks for informative reply.

As I want to connect arduino through lan/wifi remotely, in order to treat as multiplayer network game, I think I will have to add another pc? While I would like to just add sketch (http server) to arduino and connect remotely to UE4Duino based application. I have gone through JSON Query plugin details and apparently it is not updated for UE 4.10, but I will keep an eye on it.

,

Sorry that method didn’t work for you. Until someone recompiles for 4.10 on Windows 10 you might want to try use 4.9 version of the plugin for Windows 10. Beyond that maybe someone else has some suggestions.

Hi - its working now - in so far that it doesn’t give any errors on opening and shows UE4Duino in the list of plugins installed when I open my project.
However…although the plugin will open my serial port it is bringing in a constant reading of “0.0” from my arduino sensor.
I have checked this on the 4.9 version with the same Blueprint and it reads the sensor correctly in real time. I’ve attached a screenshot of the Blueprint.
Has anyone any idea why its not bringing in a correct reading with the latest Plugin Version (Using 4.10.2 on Windows 10).

Yes, I also have this problem. I tried to rebuild the plugin from begining by adding the files one by one and commenting out… The error that causes the packaged game not to run lies in either ThreadBP.cpp or ThreadBp.h. But I was not able to find it. Maybe this information helps you, but it’s really hard to find if there is no useful errormessage at all.
Good Luck!

hi … its a really coool plugin, but im having problems with “read serial” function, it has to return the same character that i send to the BP, but i have no response in the console. read function is not working …

“write serial” function is working fine, i proved it before.