hey, I am getting an error "Sketch uses 13102 bytes (40%) of program storage space. The maximum is 32256 bytes.
Global variables use 1539 bytes (75%) of dynamic memory, leaving 509 bytes for local variables. The maximum is 2048 bytes.
Low memory available, stability problems may occur." and I am only able to read the value from the sensor(of address 0x68) I am not able to read the values from another sensor (of address 0x69).
could you please help me with the code n overall connections.
2_gyro.ino (2.75 KB)
You have a lot of strings being printed by serial. You could reduce your RAM footprint by putting them in progmem using the F macro like this:
Serial.println(F("IMU initialization unsuccessful"));
As to your other issue, how have you set the address of the device you can't read from?
Is it possible to operate 2 MPU9250/MPU6050 simultaneously?
As far as I know that the DS3231 RTC has the same I2C address (0x68) as that of MPU.
What we do to resolve the address issue when using RTC and MPU together is:
change the I2C address in the header file (Library File) of MPU to 0x69 and connect AD0-pin to 5V.
Now, MPU has the address 0x69 and the RTC has the address 0x68; they can work together.
This is not the case for two MPUs!