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

Feature request: Add IO.VIN enum member to read the voltage #104

Open
BenediktBurger opened this issue Jan 16, 2024 · 2 comments
Open

Feature request: Add IO.VIN enum member to read the voltage #104

BenediktBurger opened this issue Jan 16, 2024 · 2 comments

Comments

@BenediktBurger
Copy link
Contributor

It would be good to read the voltage of the motor cards.

I found, that it is possible to read that voltage via get_analog_input, if you know the correct pin number.

I see two possible options:

  1. add a get_voltage method (which does the correct calculation to return the voltage in Volts)
  2. add a VIN enum member to the IO enum of the motor cards, see my PR Add VIN to IO enum of TMCM6110 #103 for one motor card.

Thanks for considering.

@trinamic-bp
Copy link
Contributor

It could actually be both, I accepted you PR, but the get_voltage would come in handy as well.
Note that the added VIN is not in the released PyTrinamic on PyPI, till we create a new release.

@BenediktBurger
Copy link
Contributor Author

I understand, that it will take some time till the next release.
However, I did not do it for immediate change ("8" will work as well), but for a better library.

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

No branches or pull requests

2 participants