Hi Guys, A really great plugin and documentation made it very to set up and test. Is there a method to deal with many inputs?
I have a strange problem I have had since I started using the plugin. My Unreal project sends sequentially commands on the serial port. it happens that some command is ignored / skipped
and the Arduino board doesn’t receive the command. If I restart the application (in the editor) the app work correctly and other times not.
Launching the same commands from the Arduino “Serial Monitor” everything works properly.
I noticed also that doing so many serial write in a short time, they are not being received properly by the arduino board (no comunication)
Can you help me please?
@ (or anyone)
Is there any way to view what UE4 is sending over serial when using the serial write command. I’m doing a really basic attempt at lighting an LED when a vehicle goes over a certain speed, but it won’t seem to light. I’d use the arduino serial monitor but unfortunately you can’t use the serial monitor and UE4duino at the same time. The arduino code worked when I was sending it commands over the serial window, so I assume something is going wrong on the UE4 end.
Many inputs as in several signals being sent over serial or many inputs as in multiple arduinos? If you are using multiple arduinos you just need to open serial ports for each of your arduinos. If you are hoping to send values for multiple analog signals you need to write them all to a single line with some sort of delimiter between the data. For example: Serial.print(A0); Serial.print(“,”); Serial.print(A1); Serial.print(“,”); Serial.println(A2); This would print a single line with three analog inputs from pins 0,1, and 2. It’s important to only use Serial.println(); on the last analog signal because that is what the Serial Read boolean is looking for. In your blueprint, there is a function called “Parse Into Array” which will take the values and put them into an array based on what you chose as your delimiter, in the case above “,”. you can break the values out of the array using “Get Array” and use your data.
I have tested some more with my arduino, it seems to work on 4.9.0 / 4.9.2 with windows 8 laptops…
but it does not work on 4.9.0 / 4.9.2 with windows 10 laptops :] and if you google something like: “windows 10 problems comm port”, you do get some results…
I think my teacher also tried it with teensy’s with the same problem, only working on windows 8… (i’m not sure about other windows versions)
I’m having some trouble getting serial data read. I’m using Windows 10 and UE4 4.9.
I’m trying the test with the Serial.println(2); in the Arduino software but nothing prints in UE4. The serial monitor in Arduino shows data being printed.
Here’s what does work. UE4 recognizes and is able to read serial data it just won’t return the values for me a print the string.
://c2.staticflickr.com/6/5717/22124530611_874fe75417_b.jpg
This works but when I connect the READ SERIAL return value node to IN STRING on Print String I get nothing. The weird thing is that it seems like its printing data but that it’s just blank. I know this because I printed a string on BeginPlay and it gets wiped off the string by blank data.
Any guidance is appreciated.
Hi,
I Have the same problem with W10 et UE 4.9.2.
With only the Open Serial and close Serial connected I have this log:
With only the :LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//ThreadTest///Thread_7c0_0///####STATCAT_Advanced#### old //STATGROUP_Threads//ThreadTest///Thread_1a50_0///####STATCAT_Advanced####
Thanks for your help.
Hey guys, sorry yet again for taking so long to reply on here. Things have calmed down a bit for me so I will be making a large effort to respond right away to questions from now on.
@Jacapo - Maybe try adding some delays in your Arduino code?
@ - The Arduino reads in the strings from UE4 one character at a time…that might be where you are having trouble. I end all my UE4 “Write Serial” strings with a end-of-string character that I test for in the Arduino code. See the pics below for an example…hope that helps!
@Lozoo501, reedandrader, valky82 - Unfortunately I do not use Windows 10 at the moment so i can’t really test for problems in that OS. I have read as well that Arduino has issues with that Windows version…
Hi.
I am trying to control a servo using the servo-firmata
can someone please write a little tutorial non how to use the nodes, a blinking light should suffice
I am not sure what message to send to get the servo moving, i understand opening serial and close, but i am not sure how to write a message.
Thank you!
I have just tested it with the Unity game engine and it works fine, so i suppose something isn’t right with the plugin code for windows 10.
@catalejo - Hi! I have a servo example ready to go and will get it done and uploaded to YouTube this evening.
@Lozoo501 - Sorry you are having issues with the plugin in Windows 10…unfortunately I don’t have Windows 10 installed yet to hunt down the problem. Once I get Win 10 installed I will let you know…
Thank you grisly32!!
I did figure something but i am very curious on the arduino sketch
you rock!
@catalejo - Didn’t get a to do a video, but here is a simple example of using UE4 to drive a servo attached to Arduino:
Here is the connections for the servo:
I started out with one of the Arduino servo sample sketches and changed it to this:
The read from UE4 happens in the ‘while’ loop.
The plugin reads the UE4 string in a character at a time so you need to add an “end” character to let the sketch know you are done with the string…in this example I use the ‘^’ character to denote the end of the string.
The code concatenates the characters into a new string and when it reaches the end character it writes the value to the servo.
In UE4 I just made an Actor blueprint and added an arrow component to it:
I rotated the arrow and made it bounce back and forth between 5 and 175 degrees on the Z axis.
I sent the value of the Arrow’s Z axis rotation, appended the ‘^’ character to the end, and sent it out to the Arduino through the Write Serial node.
When I play in the editor the servo follows right along with the arrow’s rotation.
Hope this helps a little and let me know if you have any questions!
grisly32! Thank you thank you thank you! will try tonight!
Windows 10 fix!
Hello ladies and gentlemen.
I’ve made for you the Windows 10 fix for UE4Duino. I hope you’ll enjoy it.
Credits ofcourse to Fusionlabz for making the plugin.
Download link: ://drive.google.com/file/d/0B_ERZpvFDwRDWXV1Y21HNjZSdkU/view?usp=sharing
@Skittluier - That’s awesome! Thanks for the update!
Thank you for awesome plugin!
I could quickly build arduino HW project by using this plugin but I confront problem packaging it.
When I tried to package the project it build well but does not execute. Just nothing happens when I double click the packaged .exe file.
I tried without the plugin. It builds well and execute well. So anybody have the similar problem or know why this happens?
Thanks in advance.
Hey ckyun777, I ran into the same exact problem. I am working on trying to fix it and will update when I find the problem.
Thanks!
Nice! For some reason, there are no download links for 4.8.3… Any of getting this back? I’d like to use this on an existing project for testing.
Hello,
For a project at my school I have to connect an Arduino with Unreal Engine. I want to use te output value of a potmeter in the control of Unreal Engine. To test this I made a simple program that has to print the value of the potmeter in Unreal Engine, just like the example in the beginning of this topic. However, the program doesn’t worrk. I can see the value using the serialmonitor of the Arduino-program, but I don’t see the value in Unreal. I hope someone can help me. I included a screenshot of the program in Unreal and the program for the Arduino.