-
Notifications
You must be signed in to change notification settings - Fork 14
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
Q: Two motors #11
Comments
Well done. Yes you're right - those parameters should give you control of the 2 motors. |
Just that simple ??? Wow! Thanks. I will try tomorrow morning. Now is to risky ;-) I'm a little bit tired. |
Hi @pootle, what is the propoer syntax that should I use to create two motors with two different names and two different drvenpin and spiChannel? When I try to use in motors2.py construction: motorpan=motorPanel(motor=chipdrive.tmc5130(drvenpin=12, spiChannel=1), gridx=1, pfields=pfields, panel=mpanel) I get: |
I know that I should learn the lesson "Python class constructor (default) parameters " ;-) |
Ah! silly code - the params aren't getting passed through - and I haven't got a test rig running just now. I can put a couple of edits into github, but can't test them just now.... |
Heheheh maybe I'm not so stupid as I was thinking. I will test. The hardware is on my desk now. I'm in the middle of this article: http://www.memonic.com/user/pneff/folder/python/id/1tHgm now. |
I mean I will test any changes if you will find time to make them. |
I've done the updates - not been able to test though - give it a go. |
I can confirm - it works as expected. Many thanks for your effort. I'm surprise how smooth the driver power motors. Now I'm programming two motors demo. When will be ready I'll share it with you. One more question: Have nice evening and thanks again. |
name is used for log messages, so not vital, but helps if it is different. These chips are really great at driving steppers - but getting all the reg settings right to get the best from the motor can take a while. Enjoy! |
So probably we can close the issue. What do you think about making the name "passed through" parameter as well ? |
Hi,
I have working "Pi HAT" now - both drivers are working perfectly on RPi4 . As I'm not very strong in python .... yet ;-) I'm not sure what is the best approach to have two channels working on this same time. It's possible to pass parameters to chipdrive.tmc5130 constructor? I mean something like this
motorpan=chipdrive.tmc5130(drvenpin=12, spiChannel=1)
motortilt=chipdrive.tmc5130(drvenpin=24, spiChannel=0)
Thanks for your indulgence.
Slawek
The text was updated successfully, but these errors were encountered: