unity&aruduino&SG90

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.
6741043--776845--upload_2021-1-19_19-3-0.png

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…

thank you !
but,it is difficult for me.
so,would you write a simple example?
pleaseplease.

thank you !
but,it is difficult for me.
so,would you write a simple example?
pleaseplease.

No.

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

1 Like

You seem to struggle with C#, check this out:

http://www.csharpcourse.com/

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?

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.

Like I said:

3 Likes

Check the asset store an search “arduino”. There are softwares designed for this.