-
Notifications
You must be signed in to change notification settings - Fork 992
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
Add Stepper Motor PWM-Counter driver. #720
base: master
Are you sure you want to change the base?
Add Stepper Motor PWM-Counter driver. #720
Conversation
2c08d7e
to
c1c900c
Compare
@jonathanhogg |
@robert-hh |
Sorry, I do not have any motor and /or driver hardware for testing. |
This code won't work with my version of As I currently use IRQs to implement wide-value counting, it'll be hard – though probably not impossible – to extend |
@jonathanhogg |
I'm sorry, I don't know what you mean. |
Sorry, |
Yes, but we didn't arrive at a standard API for self._counter.irq(handler=self.irq_handler, trigger=Counter.IRQ_MATCH1, value=self._match) and thus won't work with my implementation. As far as I can tell, @robert-hh's MIMXRT implementation doesn't have an |
Add .gitignore stepper_motor_pwm_counter.py: Code formatting by codeformat.py. Signed-off-by: Ihor Nehrutsa <IhorNehrutsa@gmail.com>
81f1acc
to
abdab7d
Compare
The main feature of this driver is that the generation and counting of pulses are performed by hardware, which frees up time in the main loop. PWM will start pulses and Counter will stop pulses in irq handler.
View the README
Motor speed acceleration/deceleration video
This driver requires PR's:
esp32/PWM: Reduce inconsitencies between ports. #10854
ESP32: Add Quadrature Encoder and Pulse Counter classes. #8766