# About commands from pc

**URL:** https://community.simplefoc.com/t/about-commands-from-pc/379
**Category:** Uncategorized
**Created:** [December 24, 2020, 8:48pm UTC](https://community.simplefoc.com/t/about-commands-from-pc/379 "2020-12-24T20:48:55Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Borris123](https://community.simplefoc.com/user_avatar/community.simplefoc.com/borris123/32/569_2.png) [@Borris123](https://community.simplefoc.com/u/Borris123)
#### Post date: [December 24, 2020, 8:48pm UTC](https://community.simplefoc.com/t/about-commands-from-pc/379/1 "2020-12-24T20:48:55Z")

</div>

Hello

i m new at this simplefoc community.  
i read forum nearly 3 hours.  
it is great  
i wonder  
May i send position commands from pc usb port to arduino with simplefoc library?  
Or can use it for 3d printers, cnc mills?  
i m not engineer and not good at writing codes.  
i will use bldc motors and encoders with index.

Thank you.

---

<div class="post-metadata">

### Author: ![David\_Gonzalez](https://community.simplefoc.com/user_avatar/community.simplefoc.com/david_gonzalez/32/665_2.png) [@David\_Gonzalez](https://community.simplefoc.com/u/David_Gonzalez)
#### Post date: [December 24, 2020, 10:27pm UTC](https://community.simplefoc.com/t/about-commands-from-pc/379/2 "2020-12-24T22:27:19Z")

</div>

Hey @Borris123,

This is certainly something that can be done 😃  
Here is everything you need to know about sending commands to the motor: [Communication | Arduino-FOC](https://docs.simplefoc.com/communication)

Please post if you have any questions.

---

<div class="post-metadata">

### Author: ![Borris123](https://community.simplefoc.com/user_avatar/community.simplefoc.com/borris123/32/569_2.png) [@Borris123](https://community.simplefoc.com/u/Borris123)
#### Post date: [December 24, 2020, 11:45pm UTC](https://community.simplefoc.com/t/about-commands-from-pc/379/3 "2020-12-24T23:45:16Z")

</div>

Thanks for help  
Do you know can i add limit switches?

---

<div class="post-metadata">

### Author: ![David\_Gonzalez](https://community.simplefoc.com/user_avatar/community.simplefoc.com/david_gonzalez/32/665_2.png) [@David\_Gonzalez](https://community.simplefoc.com/u/David_Gonzalez)
#### Post date: [December 25, 2020, 6:52am UTC](https://community.simplefoc.com/t/about-commands-from-pc/379/4 "2020-12-25T06:52:07Z")

</div>

Yes, this is something you can do. You could write a routine that searches for a limit switch and then do `sensor.getAngle()` to obtain the angular position where the limit switch is with respect to the starting position of the motor’s rotor.

---

<div class="post-metadata">

### Author: ![Borris123](https://community.simplefoc.com/user_avatar/community.simplefoc.com/borris123/32/569_2.png) [@Borris123](https://community.simplefoc.com/u/Borris123)
#### Post date: [January 4, 2021, 9:27pm UTC](https://community.simplefoc.com/t/about-commands-from-pc/379/5 "2021-01-04T21:27:44Z")

</div>

Thank you,  
Can we send ascii comands from pc usb port in real time? if yes can, how will be the command ?  
regards

---

<div class="post-metadata">

### Author: ![Owen\_Williams](https://community.simplefoc.com/user_avatar/community.simplefoc.com/owen_williams/32/105_2.png) [@Owen\_Williams](https://community.simplefoc.com/u/Owen_Williams)
#### Post date: [January 5, 2021, 12:03am UTC](https://community.simplefoc.com/t/about-commands-from-pc/379/6 "2021-01-05T00:03:20Z")

</div>

The link for these commands is posted by David above. Assuming you are in angle mode you could send ‘6.28\n’ to move 6.28 radians (360 degrees). If you were in velocity mode the same command would be asking for a rotational speed of 6.28 rad/s (60 rpm).
