LiquidCrystal_SI2C not working? Conflict with Wire?

Issue #62 resolved
Anonymous created an issue

I have a LCD 16x2 display that is working perfectly with LiquidCrystal_I2C on a Arduino Pro Mini. I'm using the "MenWiz" menuing library and everything works perfectly.

I want to move the I2C to use the SoftI2C on any of the following pins - Digital 10,11 or Analog 0,1 or Analog 2,3

In my code I change only two lines:

include <LiquidCrystal_SI2C.h>

and LiquidCrystal_SI2C lcd(0x27, 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

Both changes are to simply reference the SI2C library.

I have edited SI2CIO for all of the pin configurations above, trying:

// Digital 10,11

define SDA_PIN 2


define SCL_PIN 3


// Analog 0,1

define SDA_PIN 0


define SCL_PIN 1


// Analog 2,3

define SDA_PIN 2


define SCL_PIN 3


When I run the "example" HelloWorld_si2c it works fine. When I run my app using the MenWiz library it fails . If I switch back to the normal _I2C references it works.

What would be the difference in the SI2C library that the MenWiz library would not work? Looking at it's source code it simply works with the lcd object passed to it.

Comments (6)

  1. Scott Lemon

    I actually created this issue, and now have an account so that I can reply and answer questions. Sorry for the strange formatting ... I'm not sure how to edit it and clean it up since I don't own it? :-(

  2. Francisco Malpartida repo owner

    OK, as it mentions on the library being used, you will need to use an 8 bit address: LiquidCrystal_SI2C lcd((0x27 << 1), 2, 1, 0, 4, 5, 6, 7, 3, POSITIVE);

    The documentation is not very well on this area and I am trying to get that block fixed. Give it a shot with the configuration I've shared.

  3. Scott Lemon

    Thank you! I tried that and it worked!

    Can you explain briefly why this works? Doesn't that shift actually change the address from the correct address? Couldn't you do that within the library to allow the user code to instantiate the object in an identical way?

  4. Francisco Malpartida repo owner

    The library that does the bit banging uses I2C works with 8 bit addresses, while the rest works in 7 but mode. I will be changing the scheme to align everything so that it works the same way. At the time of release I had very little time so... they ended up differently. Most likely, I will change the constructor so that they are all aligned.

  5. Log in to comment