-
Notifications
You must be signed in to change notification settings - Fork 195
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
drivers: add mpu6050 additional functionality #298
base: dev
Are you sure you want to change the base?
Conversation
5318a29
to
3f2bd51
Compare
3f2bd51
to
8d60b1c
Compare
Let's first reach a conclusion in #299 before merging this. Regarding the code: I think it would be fine to merge the two ( |
Hi, sample per second? |
Depends on your microcontroller. If using a raspberry pi pico you will be limited by the MPU6050's max sample rate, by far. |
I'm looking for solutions for acquiring vibration mechanisms, using Mpu 6050 and 9250 and 9250... I'm finding it quite difficult.... I have to isolate the MPU usage for the accelerometer function, find the connection too.... |
@VirgilioRodrigues What issues are you having? Is the sampling rate insufficient? Keep in mind in nominal conditions you'll rarely be getting more than 1kHz sampling frequency. I2C baud, supplied voltage and configuration can further limit this value to well below 1kHz. for best results use high I2C baud (400kHz should be more than enough) and configure the sampling frequency to be as high as possible. I'm not sure if current driver sets it at highest, this PR had the intention of letting users modify the sampling frequency. |
Create a new device type:
DeviceStored
. It is a "better" alternative toDevice
for getting acceleration+gyroscope measurements together, less bus usage, faster sample rate and less chance of a failed read, which is a common problem on the MPU6050 with high sampling frequency.Benefits
Disadvantages
Get
orUpdate
before calling a measurement function though this could be remedied by embedding the type within a sample rate limiter.I'd also raise an idea I have in mind with this PR: creating an interface called
ARS/AHRS
or something of the sort:Working with the Raspberry Pi Pico for bus baud above 40kHz.