-
Notifications
You must be signed in to change notification settings - Fork 2.1k
drivers/hall_effect: support for generic hall effect sensors #21801
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Open Review Comments:
|
I only briefly (like 5 minutes) looked at this, but it reminds me of the |
Thanks I overlooked |
Contribution description
This introduces a new driver, a test for the driver, and a new SAUL category ID.
Hall effect sensor / magnetic rotary encoder are often attached directly to the shaft of a motor but can also be bough and used independently.
This driver is not specific to one model sensor. The driver can be used to measure RPM and revolutions since the last readout.
The test just periodically prints the RPM and revolutions since the last read.
The only other drivers measuring angular velocity were gyro drivers which have a SAUL category ID of there own. Therefore I introduced
SAUL_SENSE_SPEED.Testing procedure
I connected a sensor and ran the provided test and tested it form the shell via the SAUL adaptation.