About commands from pc

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.

Hey @Borris123,

This is certainly something that can be done :smiley:
Here is everything you need to know about sending commands to the motor: https://docs.simplefoc.com/communication

Please post if you have any questions.

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

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.

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

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).