Skip to content

Add MPU6886 driver #552

Closed
Closed
@ivoszz

Description

@ivoszz

I want to add M5Stick-C to tinygo as a supported platform with its MPU6886 (also M5Stack Core/Core2) accelerometer/gyroscope as a driver. I started by adding basic functions of the driver based on the MPU6050. But I found that I don't quite understand the concept of the return values of the ReadAcceleration() and ReadRotation() functions. These functions do not work with sensitivity settings (e.g. +/- 2g, 4g, 8g, 16g) and always return scaled raw counter values. So if I set the sensitivity to 16g, the return values are not in the range +/- 1000000, but approximately +/- 125000. Is it then up to the user to scale the result correctly?

I am able to add basic functionality in a short time. But MPU6050 doesn't seem like an ideal model to me, is it possible to recommend some other accelerometer/gyroscope unit? I would like to add more advanced features like using FIFO or IRQ later. Is there a good example? I'm not very good at naming variables and functions and a template would come in handy.

I've read the terms and conditions for contributing, is there anything I should pay particular attention to?

Thanks for any suggestions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions