interference: HiLetgo 2.8 LCD and BNO055 IMU

Hello!

my setup:

arduino uno R3
||
seedstudio base SHIELD -<(I2C connector>- Adafruit BNO055
||
hiletgo ILI9341 TFT display SHIELD

I am compiling my code WITHOUT #define USE_ADAFRUIT_SHIELD_PINOUT; meaning it will be using the pinout from the header of the example:

// The control pins for the LCD can be assigned to any digital or
// analog pins...but we'll use the analog pins as this allows us to
// double up the pins with the touch screen (see the TFT paint example).
#define LCD_CS A3 // Chip Select goes to Analog 3
#define LCD_CD A2 // Command/Data goes to Analog 2
#define LCD_WR A1 // LCD Write goes to Analog 1
#define LCD_RD A0 // LCD Read goes to Analog 0

#define LCD_RESET A4 // Can alternately just connect to Arduino's reset pin

// When using the BREAKOUT BOARD only, use these 8 data lines to the LCD:
// For the Arduino Uno, Duemilanove, Diecimila, etc.:
//   D0 connects to digital pin 8  (Notice these are
//   D1 connects to digital pin 9   NOT in order!)
//   D2 connects to digital pin 2
//   D3 connects to digital pin 3
//   D4 connects to digital pin 4
//   D5 connects to digital pin 5
//   D6 connects to digital pin 6
//   D7 connects to digital pin 7
// For the Arduino Mega, use digital pins 22 through 29
// (on the 2-row header at the end of the board).

Note that A4 and A5 are not in use, so they should be available for the I2C protocol.

basically I want to read something from the BNO and display on the screen.

Screen turns on, BNO turns on.

But soon after the LCD goes blank. I was able to trace the issue to the following line located in Adafruit_BNO055.cpp:

bool Adafruit_BNO055::readLen(adafruit_bno055_reg_t reg, byte *buffer,
                              uint8_t len)

which is using _wire calls.

If I empty this function (comment everything out) then the screen remains active (but obviously nothing gets read from BNO055.

Questions:

  1. why am I dealing with this interference?

  2. assuming I would be able to compile it and run it with #define USE_ADAFRUIT_SHIELD_PINOUT, whould that imply that the screen will be also using I2C, leaving all my Digital and A0-A3 available for other uses?

  3. why is my screen which is ILI9341 compatible not running properly using the #define USE_ADAFRUIT_SHIELD_PINOUT declaration? Is HiLetgo incompatible with Adafruit? Different I2C address?

Please help me.

thanks!

Disregard the plugs connected to the board other than the I2C connection. I removed those before running this program.

And I'm also attaching a closeup of my HiLetgo TFT pinout

i was able to solve it: using the adafruit tft shield and the dedicated data pins. that way BNO via i2c did not affect anymore

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.