Search Unity

unity&aruduino&SG90

Discussion in 'General Discussion' started by ku01218, Jul 29, 2020.

  1. ku01218

    ku01218

    Joined:
    Jul 29, 2020
    Posts:
    4
    I want to control the servo motor (SG90) by linking unity and aruduino.
    In particular
    Click on unity to move the servo motor from 0 to 120 → stop
    If you click on unity, the servo motor will move from 120 to 0 → stop
    I want to make a mechanism like that.

    If anyone knows how to do it, I would really like to know it specifically.
    Thank you.
    upload_2020-7-29_18-58-43.png
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    Google "C# communicate with arduino".

    This will land you on page describing how to send data to arduino from C# program.

    Then it is a matter of writing two tiny programs...
     
  3. ku01218

    ku01218

    Joined:
    Jul 29, 2020
    Posts:
    4
    thank you !
    but,it is difficult for me.
    so,would you write a simple example?
    pleaseplease.
     
  4. ku01218

    ku01218

    Joined:
    Jul 29, 2020
    Posts:
    4
    thank you !
    but,it is difficult for me.
    so,would you write a simple example?
    pleaseplease.
     
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    No.

    Read tutorials and learn how to do it. Controlling servos through arduino is very easy.
     
    Martin_H likes this.
  6. Martin_H

    Martin_H

    Joined:
    Jul 11, 2015
    Posts:
    4,436
    You seem to struggle with C#, check this out:

    http://www.csharpcourse.com/
     
  7. sxa

    sxa

    Joined:
    Aug 8, 2014
    Posts:
    741
    What circumstances have put you in the position where you need to do such a thing, but do not have the basic skills required to even start doing so for yourself?
     
  8. ku01218

    ku01218

    Joined:
    Jul 29, 2020
    Posts:
    4
    oh my god
    i can control servo through arduino. i know this way to.
    but,i don,t know how to connect unity and arduino.
    i want to connect unity and arduino.
    i want to make a program to rotate the servo motor through arduino when i click on unity.
    please tell me how to way.
     
  9. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,569
    Like I said:

     
    xVergilx, zombiegorilla and ku01218 like this.
  10. Marc-Saubion

    Marc-Saubion

    Joined:
    Jul 6, 2011
    Posts:
    655
    Check the asset store an search "arduino". There are softwares designed for this.