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);
1 Answer 1
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.