another i2c display not working

I bought a IC2 driver and a 16x2 digit display from adafruit (MPC23008) , put them together as explained in their website.

Now I am trying to connect this to to one of the arduino/flora devices I have.
Unfortunately none of them is working:
Arduino micro, Arduino nano (repro) and Flora v2.
I also tried to add 2 pull-up resistors connected to the between the V5 and positive bus of the I2C.
For the Micro I have used the D2 and D3 pin respectively for Data and clock, while for the Nano I have used the D4 and D5 as shown in pictures. The display connected directly to the arduino works properly (but it needs 16+ wires).
The Lat pin is not used, and the SPI enable is not soldered together.
Why is the I2C not detected at all?
They all are not even able to detect the address of the I2C. Tested with this code:

#include <Wire.h>

void setup()

 while (!Serial);             // Leonardo: wait for serial monitor
 Serial.println("\nI2C Scanner");

void loop()
 byte error, address;
 int nDevices;


 nDevices = 0;
 for(address = 1; address < 127; address++ )
   // The i2c_scanner uses the return value of
   // the Write.endTransmisstion to see if
   // a device did acknowledge to the address.
   error = Wire.endTransmission();

   if (error == 0)
     Serial.print("I2C device found at address 0x");
     if (address<16)
     Serial.println("  !");

   else if (error==4)
     Serial.print("Unknown error at address 0x");
     if (address<16)
 if (nDevices == 0)
   Serial.println("No I2C devices found\n");

 delay(5000);           // wait 5 seconds for next scan

I think this post belongs to Networking. Can any admin move it there?

Why do you imagine that?

Right, first things first.

Please go and read the instructions, then go back and modify your post (use the "More --> Modify" option to the bottom right of the post) to mark up the code (but it needs to be the complete code) as such so we can examine it conveniently and accurately. Please do not post a ".ino" file as an attachment - that would mean that you are expecting people to actually load it to their IDE to look at it and that is extra unnecessary labour. In fact, attachments do not always show properly on different operating systems.

If you do not mark it up as code, the code you post could well be garbled and is certainly anything but easy to read.

Note: Also mark up any data in the same way. This includes the error output that you get from the IDE.

And - before you post any code, use "Auto Format" in the Tools menu of the IDE to properly present the code.

Try and avoid unnecessary white space (blank lines). You should only use these to separate functional blocks of code.

In the English language, we do not "weld" connections in electronic assemblies, we "solder" them using solder and - usually - a soldering iron. The only things welded are the connection tags on the ends of batteries which allow you to solder wires to them. I suspect you know this but apparently many or most other languages are more clumsy in this regard.

Kudos for using a proper operating system for engineering work!

Done all adjustment, though I still believe it is better to move it into the network session as I2C is a more a network protocol (and nobody is replying here :slight_smile: )

What planet did you come from?


Your display doesn't seem to be soldered to the backpack.
Are the screw terminals (not) connected in the same way ?

Network protocols do not involve soldering.

the display is soldered to the I2C driver properly although you cannot see this properly from the picture (I checked with a tester), I have noticed that the terminal pins (5V,GND,SDA...) were a bit touching the main board of the display and I add a thick piece of paper just in case. I think those connections are fine.
Moreover, is the "Wire test" not supposed to check just the I2C even if the display is not there?

I thought I2C is a network topic (bus, communications...., anyway it is not critical.

I have checked if the SDA and SCLOCK are shortcuirted, and no.
whether SDA or SCLOCK are shortcuirted to 5V, and no (unless I connect the pull-up resistors.)

I have double checked again which pin to connect to both the MICRO and the NANO, and they were correct.

I have tried different pull-up resistors and nothing.
I have to conclude that the I2C drivers is damaged somehow.

the display is soldered to the I2C driver properly although you cannot see this properly from the picture (I checked with a tester),

The backpack is not properly soldered to the LCD.
Take a look at your solder connections; then, look at the solder connections of header pins on Micro or Nano board.
You should notice a big difference. Your soldering is not proper and you can see gaps between the pin and the hole.
Poor soldering can cause lots strange and hard to track down issues.

Moreover, is the "Wire test" not supposed to check just the I2C even if the display is not there?

Yes, but it can only work if there are proper connections between the Arduino pins as the pins of the i2c slave chip.
Given the poor soldering of the backpack to the LCD, it is possible that the soldering of the screw terminals may have issues as well as MAS3 asked.

I thought I2C is a network topic (bus, communications...., anyway it is not critical.

This thread is in the proper location.

Once you get the soldering & wiring issues resolved, you will then need to have a proper library to run this device that knows how to talk to a MCP23008 to drive a hd44780 lcd.
IMO, You only have two choices, you can use the Adafruit library or you can use my hd44780 library.
The Adafruit library is SLOW, and I mean really slow.
That library does not require that you know the full i2c address, as you only enter in lower 3 bits of the address jumper settings.

You could use my hd44780 library package. It includes a hd44780_I2Cexp i/o class that supports MCP23008 based backpacks, including the adafruit backpack.
It auto detects the settings like the i2c address for you.
It also includes a diagnostic sketch, I2CexpDiag, which can help diagnose issues.
It is MUCH faster than the Adafruit library.
The hd44780 library is available in the IDE library manager.
You can read more about it the github page: GitHub - duinoWitchery/hd44780: Extensible hd44780 LCD library and its wiki.
There is also documentation included in the library that can be viewed once the library is installed.

--- bill