I am using a IMU the GY521 on my DUE , Wire1 port.
When I boot, the IMU shows up about 70% of the time, the rest I get
("\tCould not connect to GY521");
Did some research and I installed 2 pull-up resistor (5k each) on SDA1 and SCL1.
The go to the 3.3v. It did not solve the problem.
I would like to slow the communication from 400Khz to 200.
My wires are about 5 inch long. There must be a command for that, but I could not find it.
Thanks a lot.
#include "GY521.h"
GY521 sensor(0x68, &Wire1);
uint32_t counter = 0;
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println(__FILE__);
Serial.print("GY521_LIB_VERSION: ");
Serial.println(GY521_LIB_VERSION);
Wire.begin();
delay(100);
while (sensor.wakeup() == false)
{
Serial.print(millis());
Serial.println("\tCould not connect to GY521");
delay(1000);
}
}