Skip to content

basic phidget stepper motor support for slider and buttons - #1715

Merged
MAKOMO merged 6 commits into
artisan-roaster-scope:masterfrom
crocsaint:master
Oct 18, 2024
Merged

MAKOMO merged 6 commits into
artisan-roaster-scope:masterfrom
crocsaint:master

Conversation

@crocsaint

Copy link
Copy Markdown
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
Copy Markdown

@MAKOMO
MAKOMO merged commit c139b69 into artisan-roaster-scope:master Oct 18, 2024
@MAKOMO

MAKOMO commented Oct 18, 2024

Copy link
Copy Markdown
Member

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