Using Software I2C for Pin-Nimble Wiring

// Simple i2c LCD First Test

#include <Wire.h>
#include <LiquidCrystal_I2C.h>

uint8_t Brks;

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

void setup()
{
  lcd.begin(16, 2);
  lcd.clear();
}

void loop() {

  for (Brks=0; Brks<255; Brks++) {
    lcd.clear();
    lcd.print("Brake ");
    lcd.print(Brks, DEC);

    delay(250);
}

}

This is simple working code that runs a counter and displays "Brake [Value] on my hardwired ProMicro Leonardo and an I2C wired LCD. It works as suspected.

I need to do the same thing using Software I2C on a different system because I am already using the hardware I2C pins.

I mostly understand the drawbacks of doing this but I need this function for this project.

Would someone please help me?

Showing me an idea here will propel me forward in my project and I would be extremely grateful.

Thanks

GMcMurry

Are you using the hardware I2C pins for another I2C device?

No I am not using the Hardware I2C pins for I2C. One is PWM and one is just Digital Output. The Software I2C would be the only I2C on the system.

The system is on a custom PCB and therefore trace bashing is not really a great option.

I know there are libraries for this but there are several and I am unclear how to implement.

Do I still need Wire.h and then just one of the Soft Liquid Crystal libraries?

Greg