I'm trying to use an I2C LCD that's connected to a Feather M0 that's soldered into a PCB board. The M0 has two pinouts labeled SCL and SDA that are, as expected, connected to the SCL and SDA pins on the I2C "backpack" of the LCD. I assume that SCL is "Serial Clock" and SDA is "Serial Data".
When I try using the HelloWorld_i2c example sketch from the Adafruit LiquidCrystal library, it does not work. I think it's because the header of that example includes the following:
/* Demonstration sketch for Adafruit i2c/SPI LCD backpack using MCP23008 I2C expander ( http://www.ladyada.net/products/i2cspilcdbackpack/index.html ) This sketch prints "Hello World!" to the LCD and shows the time. The circuit: * 5V to Arduino 5V pin * GND to Arduino GND pin * CLK to Analog #5 * DAT to Analog #4 */
Note that this assumes that CLK and DAT are connected to the board's Analog 5 & 4 respectively. But the pin numbers for SCL and SDA are not the Analog 5 & 4 of, say, my Arduino UNO. They are pins 21 and 20 on the Feather.
In the call to initialize the LCD, the example uses the code:
// Connect via i2c, default address #0 (A0-A2 not jumpered) Adafruit_LiquidCrystal lcd(0);
Is there a way to add optional parameters to indicate which pins are connected to SCL and SDA? Or is there a separate call to do this?
Thanks for your thoughts,