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

Fix for Arduino Uno R4 minima and wifi #106

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mjs513
Copy link

@mjs513 mjs513 commented Jul 13, 2023

While working with the new Uno R4 Minima I managed to get it working by changing the test I2C Buffer Length in the .h file:

#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega168__)

//I2C_BUFFER_LENGTH is defined in Wire.H
#define I2C_BUFFER_LENGTH BUFFER_LENGTH

#elif (!defined(ARDUINO_UNOR4_WIFI) || !defined(ARDUINO_UNOR4_MINIMA))

//The catch-all default is 32
#define I2C_BUFFER_LENGTH 32

#endif

the R4 boards has the Buffer Length specified in Wire,h as I2C_BUFFER_LENGTH already - thats why have to skip completely.

Also during testing I noticed that alot of times the chip is not found but if I did the following it would work:


  if (myIMU.begin() == false)
  {
    Serial.println("BNO080 not detected at default I2C address. Check your jumpers and the hookup guide. Freezing...");
    //while (1);
  }

  Wire.setClock(400000); //Increase I2C data rate to 400kHz
  myIMU.softReset();
  delay(250);

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

Successfully merging this pull request may close these issues.

1 participant