Skip to content

Adding the possibility to drive a stepper motor - #5

Draft
jerlfan wants to merge 2 commits into
PyMoDAQ:5.0.xfrom
jerlfan:main
Draft

jerlfan wants to merge 2 commits into
PyMoDAQ:5.0.xfrom
jerlfan:main

Conversation

@jerlfan

@jerlfan jerlfan commented Apr 27, 2025

Copy link
Copy Markdown
  1. Added a pyproject.toml and hatch_build and removing setup.py to follows the new template style.
  2. Adding methods to arduino_telemetrix: initialize_stepper_motor, move_stepper_to_position, get_stepper_position
  3. creating daq_move_StepperMotor
  4. config.template.toml updated with stepper
  5. stepper_absolute.py and test_dtepper_class.py have been used to developed. They can be removed in the future.

To be improved:

  • axis management: each axis (motor) is defined by a set of 3 pins

Known issue:

  • move_home doesn't work porperly. It moves but does not update the current_position
  • at initialisation units are meters by default. The 'm' must be remove.

@seb5g
seb5g changed the base branch from main to 5.0.x May 22, 2025 09:44
@seb5g
seb5g changed the base branch from 5.0.x to main May 22, 2025 09:45
@seb5g

seb5g commented May 22, 2025 •

Copy link
Copy Markdown
Contributor

Hi @jerlfan , there was already a branch (the main one actually) called 5.x that implemented the pyproject layout. Could you check/change your PR to use this one as the base branch (see the edit tab on right top of your PR)

@seb5g

seb5g commented Oct 11, 2026

Copy link
Copy Markdown
Contributor

@jerlfan could you try and do what I proposed?

@jerlfan
jerlfan changed the base branch from main to 5.0.x October 12, 2026 18:44
@jerlfan
jerlfan marked this pull request as draft October 12, 2026 19:46
@jerlfan

jerlfan commented Oct 12, 2026

Copy link
Copy Markdown
Author

Hello Sébastien,

Done: I rebuilt the branch on top of 5.0.x, keeping only the stepper motor additions (arduino_telemetrix.py, config_template.toml and the new daq_move_StepperMotor.py). The actuator now follows the PyMoDAQ 5 interface (DataActuator, per-axis units and epsilons), which also fixes the two known issues listed above: the default unit and move_home not updating the position. check_plugin reports it as OK, and the unit is correctly displayed.

I have not been able to test it on the hardware yet, so I converted the PR to draft. I will test it with the Arduino and mark it as ready for review afterwards.

Thanks!
Jérémie

Note: check_plugin still reports a few warnings on files I did not touch (daq_move_LED, daq_move_LEDwithLCD, daq_move_Servo, color_synthesizer, and extensions = false in pyproject.toml while the package has code in extensions). I left them out of this PR to keep it focused on the stepper motor.

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.

2 participants