1

In this tutorial the writer used digital pin 2-5 and pin 11 and 12, can I use other I/O pins if I define it in the library?

const int rs = 12, en = 11, d4 = 5, d5 = 4, d6 = 3, d7 = 2;
LiquidCrystal lcd(rs, en, d4, d5, d6, d7);
asked Jun 25, 2021 at 16:36
0

1 Answer 1

2

Yes, you can. There is nothing special about the pins an LCD like this uses, it's just simple IO. You can even use the "Analog" pins for digital IO. The only pins to stay away from, which is a good rule in general, are the TX and RX pins (pins 0 and 1 on the UNO) as they are used for communication with the PC through USB. All the other pins are fare game for something as simple as an LCD.

answered Jun 25, 2021 at 18:18

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.