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

Add Arduino library and demo: turn an 8-bit or 16-bit timer/counter into a software callback timer library #11

Open
ElectricRCAircraftGuy opened this issue Sep 20, 2022 · 0 comments
Labels

Comments

@ElectricRCAircraftGuy
Copy link
Owner

ElectricRCAircraftGuy commented Sep 20, 2022

Could be useful for filtering out 8 kHz ~ 16 kHz motor PWM throttle pulses, for instance, when trying to read the commutation frequency to measure RPMs in a sensorless brushless DC motor.

Obviously it would have many more uses than this too. For RAM allocation, consider mallocing during initialization only, then never again. That's a safe way to go about doing it. The other option would be via static global variables to pre-allocate a memory chunk for the underlying sorted list to store the timeout times.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant