UE4Duino - Arduino to UE4 plugin Release!

[] [/MENTION] Thanks a lot for the reply! I will try it in a few days, when a second sensor arrive.

I just installed Unreal 4. Never used it before. I’ve been using unity.
I have created the plugins folder into a new blank project and copied ue4duino.
It shows up in the plugins list. But i do not know how to start using it or add it to my scene and start working with it. I just can’t find it anywhere in any of the options. can you provide some instructions?

If you just installed the engine i suggest you to learn the basics of the blueprints first, if you do know the basic just type ‘serial’ o the blueprint editor to create magic

Hi Gabriel,

Thanks. I have looked at the BP basics. Just to start off I have created a blueprint actor in a C++ project. I would simply like to attach some serial port/arduino behavior to it using the plugin:

  1. control a motor and keep updating 2. control a servo motor 3. send a string over serial (say “a100”) to arduino which triggers a third motor at given speed. 4. control some LED’s.

I have got the plugin set up and showing up:

How do I go about doing this (just an overview). I know the basics about opening the port, read/write commands and closing it finally.
Can the plugin auto-detect on which port the arduino is connected?

Thanks,
.

, you should visit some 's posts from the first couple of pages. They will give you insight as to how to get your blueprint started and sending/receiving data.

Does anyone know how I can make an incoming serial value trigger a keyboard press…eg. if serial = 1 ‘keyboard keypress = A’. ??

Thanks . Yes I am doing exactly that now.
The issue is that the read serial is not getting any value even though I am writing to the serial port in the arduino uploaded code. Here is my test scenario - Arduino Uno on a Win 10 machine running Unreal Engine 4.10.4


How do I get the read/writes working?
.

@

Make sure you only have one program trying to access the serial port at a time, i.e. if you are running UE4 close the Arduino serial window and vice versa. I would suggest using a “branch” and print to screen whether the serial port is in fact open in your blueprint. “Is Serial Port Open” will return true if the serial port successfully opened and false if it did not. Also do normal checks to make sure you are telling UE4 to open the correct port, I have commented on this before near the bottom of page 5.

With your Arduino Sketch, you should only need the serial.println() function because the plugin looks for a new line to read in data.

@joeycampbell

Are you receiving the 1 on from UE4 on your Arduino or are you sending the 1 from your arduino to UE4? If you are doing the latter, I would suggest using an “is equal to” function and a true/ false branch if you need an event to occur if it receives a 1 because I don’t believe you can give input to the “A pressed/ A Released” function in the blueprint.

What are you trying to accomplish by setting the 1 equal to meaning A pressed/ A Released?

Hi

I do not have the arduino IDE/or Serial Monitor running at all. I am only running UE4.10.
I will try with the branch as you suggested. (Though I do know that the serial port opens successfully as I get true values from IsSerialPortOpen). Only I obtain nothing in the read serial string.
I used both Serial.print and Serial.println functions just to check if it made a difference. Earlier I only tried Serial.println but could not read the port in UE4.10.

Apparently UE4.9 works with the exact same code on Win10.

Can anyone confirm that they have the “4.10 version of the UE4duino plugin” functioning on “Win 10 with UE4.10.4” installed?
If yes, how did you make it happen? :confused:

.

Hi

first of all: very usefull plugin (i you use an Ardunin FDTI-Cip).
I thought i can use the plugin to read any seriell data, but it seems that the plugin just read the data from an Arduino device. I tried the following:
First PC: Kinect V2 / A little program for the data from the Kinect-> USB/RS232 to the 2. PC
Second PC: UE4(10 & 9 with your plugin on Win10/64) should get the data and control an avatar.
Result: No data. I’d tried all combinations of EOL(CR/LF/CR&LF/ASC13/STX&ETX/…) but no data came in. i tried a ArduinoNano with a print loop an everything fine.
Is your plugin limited on the Arduino??? How can i pack the plugin to the EXE (that does not work)?
Cable is ok (RS/TX), USB-Driver is installed for the conector and it works with other applications.
Any hints for me?

Greetings

Hi the signal is being passed from Arduino into Unreal. A potentiometer is attached to bicycle handlebars and I want this analogue rotation to control the characters left/right movement hence the A & D keys.

@MrBarnickel Those would be better questions for @ who is the owner and writer of the plugin. I simply have adapted it to my game and have a bit of experience with it.

@sidhants just to keep chipping away at what may be easily overlooked problems before having to get deeper into code and the like. Is your arduino connected to Serial Port 3? As a side note it appears you reading from your serial port in the image you posted based on the "Hello World.Hello World I’m seeing being printed to your screen.

@joeycampbell Does your bicycle in unreal engine have a way to input to the turning axis? Generally if you are able to control it using WASD there is an equivalent function to set the axis value in the blueprint. Can you post the blueprint that shows how your steering controls work?

PS: I should let you all know that for reason of my game development I stopped updating this plugin after the UE4.9.3 compatible version because I was able to succefully build a c++ game with it.

Thanks - its on a work machine and I’m at home…
I’ll post that tomorrow but i also came across this option which would save me having to alter anything in Unreal:
://www.arduino.cc/en/Reference/KeyboardWrite

@joeycampbell That would definitely be an easy way to solve it if can work with the serial.println() UE4duino seems to need. The benefit to doing it how I mentioned is that if you run a calibration on your arduino for maximum and minimum values of the potentiometer you could send values that are non-integer and have really fine tuned steering. That’s what I did with my ATV simulator and it’s made for a really nice experience.

Hi

Yes the arduino UNO is connected to serial port 3.
I got it working with UE4.9. That’s the image from the UEengine 4.9 test which is reading and writing serial data without issues (i.e hello world hello world).

The problem is with the UE4.10 plugin that is not working on windows 10 atleast for me.

.

Hi - did you have a potentiometer for the steering and if so how did you connect the potentiometer to the steering shaft of your project.
Did you use elastic or did you embed the ‘pot’ in a rubber wheel ?
I’m looking for a design to attach to handlebars that will be robust and not keep falling off.
Any advice ?

Hi. I’d like to know, when will the new version of UE 4.11 appear?

Same question :slight_smile: