Trouble w/ Stepmotor Driver Module v1.1 & UiFlow2
-
Hello,
The sample code didn't work for me out of the box. W/ the following modifications, it kind of works:
1/ I needed to switch this to disable (or eliminate the line). Really curious. You give the command "please enable", and it does the opposite. In my opinion this is a bug.
2/ It took a lot of trial and error to understand the purpose of setting the PWM freq. I was wondering myself whether it reduces the voltage like in a H-bridge/normal DC motor? Or it controls how much increments per time unit (sec?)? In my case (a NEMA 23 motor). I understood that its the later.
- 1000 (1kHz) is way too much.
- 100: the motor spins, but quite un-smooth
- 300: the motor spins smoothly
- 1: an increment each second
My question is the following: how can I use precise movement? If I tell it "please rotate w/ 50 increments per second", it does the work. But how can I know when those increments finished? Using a timer doesn't seem the right thing to do. I saw that other libs, have this kind of "feedback". Or I'd need an API where I say: please move X increments (instead of saying please move at a rate of Y increments per second).
-
My findings:
1/ I needed to switch this to disable (or eliminate the line). Really curious. You give the command "please enable", and it does the opposite. In my opinion this is a bug.
I'm pretty sure we are talking about a bug. I.e. that boolean is somehow interpreted negated.
My question is the following: how can I use precise movement?
I'm pretty sure the answer is NO (using this lib). I struggled a bit and wrote myself some code. But I ended using another lib. More info in this post.