how do I change my SDA pin on the LC library?

I’m using an UNO and a 20x4 LCD. when i connect my LCD SDA pin to A4 as shown, the board seems to short out as it will not perform any operation even on the serial monitor. however when I connect to A1 / 2, it runs operations but doesn’t show on the LCD as it is not defined in the library. is there any way i can edit the library to define a1 as my SDA input so my LCD will work? (8.96 KB)

The I2C bus is a hardware item and not relocatable. I’m sure there is no point in asking what you mean by “run operations”, but seeing nothing on the display nicely sums up the futility of what you are doing. I’m surprised anything is actually shorting out, but this is not the way to fix whatever is happening. You probably haven’t caused any real damage and, If you properly follow a simple hello world example that you will surely find included in your library, including the wiring, you should be OK. The wiring in the picture looks kosher, but the power supply is conspicuously absent. Please don’t tell us it’s a 9v PP3 battery.

the power supply is a 5v transformer due to be ran through mains and I've tried the hello world example with added serial reading and same again, no reading on the serial monitor unless the SDA pin is connected to a1.

Well, I thought the objective was to see a display on the LCD, so I guess there are two questions left:

  1. How is the 5v connected?
  2. Do you get a reading on the serial monitor if SDA is not connected to anything?

The 5v is connected through voltage input and no. my LCD is only connected through SDA, VCC, GND, SCL.

through voltage input

That statement is ambiguous. There are 3 "voltage inputs". Barrel jack, Vin and the 5V on the power header. Which voltage input did you use?

OP image

How to post an image.

Post a photo of YOUR wiring.

Post the code that you tried.

There are 3 "voltage inputs". Barrel jack, Vin and the 5V on the power header. Which voltage input did you use?

Four actually,

The "Barrel jack" and "Vin" are useless for most purposes, and not suitable for 5 V.

If you have (regulated) 5 V, you feed that in either through the USB port if you are using a USB "phone charger" or similar with a USB cable, or the "5V" pin - the same point where you are connecting the backpack. And ground of course.

You need to clarify - if you do not connect the LCD at all, does your code - whatever it is - run and what does it say? See the forum instructions and post your code and error output.

groundFungus It's connected through Vin Voltage input.

Paul__B I don't get any error code at all on the program and yes everything else works when the LCD is either totally disconnected or connected using pins A1&5. but when it is connected through A4 even the serial monitor doesn't show anything.

Post photos of the actual 20x4 LCD and Uno.

  1. show wires connecting backpack and Uno.
  2. pcb view of the backpack and LCD
  3. front view of LCD that shows the soldering of pins.
  4. edge view that shows whether the backpack pcb is touching the LCD pcb.

It should be straightforward to see the problem from clear photos.
If (4) shows that the pcbs are not parallel, cut a small piece of card. Slip it between the backpack and LCD to stop any shorts.


Don't bother posting any photos of anything until you have read reply#6 and have realised that you must power your Arduino in the proper manner. With a 5v supply, this means using the 5v pin or using a USB cable. This might not solve the problem, but there is no point in proceeding until you do.