LCD2004 and other "software backlight" support
The LCD2004 display is a 20x4 line character display commonly sold on Amazon. They are advertised as Arduino-compatible, so when you search for "LCD2004" or "Arduino LCD" they will turn up.
The display uses only four wires: +5V, GND, SCL, and SDA. There is no additional pin for backlight, as this is handled by the I2C shift register onboard the display. (The shift register controls backlight on pin 8, so every time they send a command, they "or" the data with 0x08 to turn it on, or 0x00 to turn it off.) Power is pulled directly from +5V and controlled by an I2C command. However, the backlight control code seems to have a built-in assumption that backlights are only driven by pins on the MCU.
When I run HelloWorld_i2c, I get rapid flashing of the backlight (it stays off most of the time, probably the display reseting itself and defaulting backlight to on) with some unlit characters flashing around in the backbground.
I tried changing your code in I2CIO.cpp, like this: In I2CIO::write, change the sending line to this: Wire.send ( _shadow | 0x08 ); In I2CIO::digitalWrite, the sending line looks like: status = this->write ( _shadow | 0x08 );
This had no effect and I'm not sure what to try next.
Using the "LiquidCrystal_I2C" library (not yours) I am able to turn on the backlight in software and write characters to the display. There is no reseting or flashing. I was hoping to use your library since it's much faster!