Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

basic phidget stepper motor support for slider and buttons #1715

Merged
merged 6 commits into from
Oct 18, 2024

Conversation

crocsaint
Copy link
Contributor

Hello,

I added basic commands to control a phidget (bipolar-) stepper motor via a slider or button action.
I copied the structure of the phidget RC servo implementation.
Currently there are 3 commands:

rescale(ch,val[,sn]) - used to set the rescale factor
engaged(ch,state[,sn]) - used to engage the channel
set(ch,pos[,sn]) - used to set the target position

The (scale) 'Factor' in the Events-window can be used to decide the direction (-1 for counter-/ 1 for clockwise).
In combination with the 3 commands and the min/ max of the slider there are many ways to control the stepper motor.
The rescale factor can be used to make 1 step = 1° or 1 step = rotation, etc.
So setting the min=0, max=100 and factor=-3.6 in combination with the right rescale factor gives a rotation in [0,-360°] where each step is equal to -3.6°.

@AppVeyorBot
Copy link

@MAKOMO MAKOMO merged commit c139b69 into artisan-roaster-scope:master Oct 18, 2024
1 check passed
@MAKOMO
Copy link
Member

MAKOMO commented Oct 18, 2024

This looks very good! Thanks for this addition. I merged this as is and will add documentation to the Phidget page on artisan-scope.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants