Hello,
I'm using the "New LiquidCrystal" Library from here: https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/Home
Everything is working great, and now I want to move the I2C to different pins. I have found references that this new LiquidCrystal library supports SoftI2C, but I'm not finding examples on how to do this.
Instantiating the LiquidCrystal_I2C appears to assume pins 4 and 5, so how do I create the display object and indicate the alternate pins I want the SoftI2C to use?
Anyone have some sample code or a link to details on this?
Thanks!
An update ... but I'm still not there ...
I found that I use the following library: LiquidCrystal_SI2C ... and this library exists and is compiling.
To determine the pins, it says to edit the SI2CIO.cpp file and specify the pins and ports.
I've tried:
Analog Pins 0/1:
#define SDA_PIN 0
#define SDA_PORT PORTC
#define SCL_PIN 1
#define SCL_PORT PORTC
Analog Pins 2/3:
#define SDA_PIN 2
#define SDA_PORT PORTC
#define SCL_PIN 3
#define SCL_PORT PORTC
Digital Pins 10/11:
#define SDA_PIN 2
#define SDA_PORT PORTB
#define SCL_PIN 3
#define SCL_PORT PORTB
And I can get nothing to work.
I have the display working with the standard Analog pins 4/5, but even trying those with the "SoftI2C" does not work.
Anyone have experience with this?
I'll post my resolution here for anyone doing their own searching.
When I edited the SI2CIO.cpp file to change the settings, it turns out that the IDE fails to detect the change in the library and force a re-complie/re-build. :-/
I had to go into the cache/build temp directory each time and delete all of the files to force the LiquidCrystal_SI2C to be rebuilt each time I edited the settings.
Once I did that I was able to get it working, and get the examples to work!