Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Idberti · Jan 05, 2018 at 02:13 PM · vroculusriftarduino

How do I use servo motor as output in arduino uno from touch controllers in unity3D?

I wanna build a haptic feedback with servo motor and arduino uno by moving the controllers in vr (along with oculus rift), but I'm not sure how do I do it. I didnt find many tutorials in how to integrate arduino (as output for moving the servo) and unity, mainly videos without any explanation or download option, the best one was that, one where a robot give servo output: http://bartneck.de/publications/2015/unity/TUTORIALUnity.pdf But even then, it just suggest to download the game and there are no further explanations in the hardware setup in unity I've downloaded the ARDunity asset, it have some servo examples and it worked just fine, but the documentation is poorly made and we walk blindly trying to make different things from the examples given. Apparently the Uniduino asset has vr and servo and looks easier to work, but costs 30 dollars and I dont have the money So, what do you suggest me to do?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image meat5000 ♦ · Jan 05, 2018 at 04:36 PM 0
Share

I wrote an answer.... where'd it go?

avatar image Idberti · Jan 05, 2018 at 08:03 PM 0
Share

Thats strange your asnwer disappeareded, meat5000 Could you write it again?

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by meat5000 · Jan 06, 2018 at 01:57 PM

Unity should not handle time sensitive data flow. It can not handle the servo-controller as differences in fps and hence output will cause large instability. The Arduino should completely handle the Controller and Unity can be used to give Directions to the controller - more of a suggestion than a command.

Data can be output via a custom .dll (simple data only, will be required) and handed off to a dedicated line handler, or possibly handled directly via networking from within Unity.

You may find that working your Servo controller at a decided 'Tick-rate' might improve its performance and Unity 'linkage'; you can then repeat the last information received until new data is transmitted.

Comment
Add comment · Show 2 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Idberti · Jan 06, 2018 at 08:11 PM 0
Share

I didnt understand very well this part of your explanation: "Data can be output via a custom .dll (simple data only, will be required) and handed off to a dedicated line handler, or possibly handled directly via networking from within Unity." Since I'm not used to .dll files (never worked with them), it looks complicated to do this way I was thinking about using this package https://github.com/DWilches/SerialCommUnity for serial communication between arduino and unity The time sensitive data flow means that I cannot "print" the information about the directions of the touch controllers in a file at some miliseconds and read it everytime for the servo rotations, right? What do I use for a dedicated line handler? Is it easier than networking from within unity (something I never done either, I'm new at unity)? Anyway, thanks for your help until now

avatar image meat5000 ♦ Idberti · Jan 06, 2018 at 08:59 PM 0
Share

A dedicated line handler would be an exteral interface program that controls data flow across, say, a serial port and you can just throw data into the buffer and away it goes. I, personally, would find it easier to write such a program and have that talk to Unity (somehow) as Unity has methods of communicating outwardly but probably lacks fundamental hardware control. If you have networking set up on your Arduino you can probably even use some kind of Webserver interface to bridge between the two as www-talk isnt that difficult from within Unity.

But yeah, you can not rely on Time-sensitivity from Unity so having Direct Response of the Servo from Unity's output would be asking for disaster.

The 'input' the Controller responds to should be on the Arduino device and that input is Derived from the Unity data. This allows a large amount of control and stablisation.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

103 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Mixamo Animations not working in VR ? 0 Answers

VR Headset Simulator 1 Answer

AO of post processing causes transparency 0 Answers

AutoWalk Oculus Rift 0 Answers

How set game to Seated Experience? 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges