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

Multiple Sensors #5

Open
ghost opened this issue Jul 30, 2017 · 2 comments
Open

Multiple Sensors #5

ghost opened this issue Jul 30, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 30, 2017

Can you add a method for adding multiple sensors to the Arduino's? I'm not sure how to connect one to 0x68 and 0x69 and call both in a program. Thanks

@J3r3Xy
Copy link

J3r3Xy commented Dec 14, 2017

To use two sensors you just need to define two instances of the class and specify the address in the begin() function, like this:

MPU6050 mpu68;
MPU6050 mpu69;
void setup()
{
    // ...
    // Syntax: MPU6050.begin(dps, range, address);
    mpu68.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G, 0x68);
    mpu69.begin(MPU6050_SCALE_2000DPS, MPU6050_RANGE_2G, 0x69);
    // ...
}

@pierinagalveza
Copy link

Hi!

Can you add a method for adding multiple MPU6050 to Arduino? I mean 3 or more.

Thanks a lot

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

No branches or pull requests

2 participants