Announcement

Collapse
No announcement yet.

UE4Duino - Arduino to UE4 plugin Release!

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Only 4.9 is compatible with windows 10?

    Comment


    • I'm using 4.9 UE4Duino and Windows 10 - all good.

      Comment


      • Originally posted by joeycampbell View Post
        I'm using 4.9 UE4Duino and Windows 10 - all good.
        Your project can be packed without errors?

        Comment


        • I'm not sure I only need to use it in the editor viewport so I've never needed to package it.

          Comment


          • [MENTION=333220]Stupzow[/MENTION] The plugin looks for the serial.println() function from the arduino sketch in to read data into UE4. To read data from two analog inputs, you will need to create a single line of data like: serial.print(a0); serial.print(','); serial.println(a1); where the data is now delimited by the comma. In unreal engine you can use the 'Parse Into Array' function to get each value on its own and then do whatever you like with your data.

            Comment


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

              Comment


              • 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?

                Comment


                • 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

                  Comment


                  • 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:
                    Click image for larger version

Name:	Capture1.PNG
Views:	2
Size:	203.2 KB
ID:	1104866

                    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,
                    Sidhant.

                    Comment


                    • Sidhant, you should visit some Grizly32'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.

                      - John

                      Comment


                      • Does anyone know how I can make an incoming serial value trigger a keyboard press...eg. if serial = 1 then 'keyboard keypress = A'. ??

                        Comment


                        • Thanks John. Yes I am doing exactly that now.
                          The main 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
                          Click image for larger version

Name:	Capture2.PNG
Views:	1
Size:	20.1 KB
ID:	1104934
                          Click image for larger version

Name:	Untitled3.png
Views:	1
Size:	457.1 KB
ID:	1104935

                          How do I get the read/writes working?
                          Sidhant.

                          Comment


                          • [MENTION=36090]Sid[/MENTION]hant

                            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.

                            - John

                            Comment


                            • [MENTION=36474]joeycampbell[/MENTION]

                              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?

                              - John
                              Last edited by John Michael; 04-20-2016, 01:40 PM. Reason: Additional Information

                              Comment


                              • Hi John,

                                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.
                                Click image for larger version

Name:	Untitled4.png
Views:	1
Size:	644.5 KB
ID:	1104952
                                Last edited by sidhants; 04-20-2016, 02:02 PM.

                                Comment

                                Working...
                                X