Hi everyone,
I'm working on a project with an Arduino Uno and a 1602 I2C LCD. I need to use software I2C to control the LCD on digital pins 9 (SDA) and 8 (SCL), as the standard I2C pins are already in use.
My sketch requires the <LiquidCrystal_SoftI2C.h> and <SoftI2CMaster.h> libraries. I was able to find and install SoftI2CMaster, but I can't find a working version of LiquidCrystal_SoftI2C.h in the Arduino Library Manager or via Google.
When I try to compile, I get this error:
fatal error: LiquidCrystal_SoftI2C.h: No such file or directory compilation terminated.
Here is my full code:
#include <SoftI2CMaster.h>
#include <LiquidCrystal_SoftI2C.h>
LiquidCrystal_SoftI2C mylcd(0x27,16,2,9,8);
float checkdistance_4_3() {
digitalWrite(4, LOW);
delayMicroseconds(2);
digitalWrite(4, HIGH);
delayMicroseconds(10);
digitalWrite(4, LOW);
float distance = pulseIn(3, HIGH) / 58.00;
delay(10);
return distance;
}
void setup(){
mylcd.init();
mylcd.backlight();
pinMode(4, OUTPUT);
pinMode(3, INPUT);
}
void loop(){
mylcd.setCursor(0, 0);
mylcd.print(String(checkdistance_4_3()) + String(" cm"));
mylcd.setCursor(0, 1);
mylcd.print("");
mylcd.clear();
delay(100);
}
Could anyone please help me find where to download the correct LiquidCrystal_SoftI2C.h library? Or, is there a better, more current library for controlling an I2C LCD on custom pins?
Thanks in advance for your help!